Debugging Checklist
Background
In order to fully debug Video Center Player issues, one must be able to:
- Bring up the JS console
- Interact with JS objects
- Use the browser element inspector
- Use the browser network tab
Below we’ve provided a few of the common Player issues to help with troubleshooting. If none of the below applies and you are unable to fully debug Video Center Player issues, please submit a ticket.
Common issues
Issues with instantiating the Player
- Potential cause #1: issues with imported videos and mismatch between video bitrate and max bitrate setting
- Check event log to validate that this is the actual issue (link to error doc). The event ID will be 930. If not, look at other potential causes.
- If the event ID is 930, either have the client adjust the Max Bitrate to something higher (see window.PoWaSettings section below), or lower the bitrate for the transcoding of the video.
Issues with ads
- Potential cause #1: Issues with pre-roll ads
The player employs four scripts to run video on a page. There’s powa.js
, powaDrive.js
, powaBoot.js
, and {org}.js
. The three “powa” scripts should be available under https://{org}.video-player.arcpublishing.com/{prod|sandbox}/{script}.js
and the “org config” script should be available under https://{org}.video-player.arcpublishing.com/{prod|sandbox}/org/{org}.js
.
The player itself is powa.js
. It plays videos and ads. It doesn’t know about Video Center, or Arc, ANS, what a UUID is; it just plays videos and ads. If a developer wishes to create a video player for a video or stream that is not hosted by Video Center they could use powa.js
to create a “raw” player.
powaDrive.js
wraps powa.js
and does know about Video Center, and Arc, and ANS. It makes the request to the Video API to fetch the ANS for a UUID and knows how to parse that response to instantiate a player with powa.js
. It also maintains any playlists that may be employed.
powaBoot.js
is a script that, on page load or when it is loaded, scans the page for any elements with a class of powa
and boots a player up upon that element. At a minimum the “powa” element must have a data-org=”{org}”
attribute and a data-uuid=”{uuid}”
attribute. With these two values powaBoot can obtain the organization’s player config script ({org}.js
) and instantiate an instance of powaBoot with the desired UUID.
The {org}.js
script contains all of the player configurations particular to an organization. Any configurations or customizations for the player should live here. Sometimes these configurations and customizations reside external to this script (e.g. in a React component or on the page itself), which can make debugging a little more difficult.
Client-side Tools
Network Tab
If any of the “powa” scripts cannot be obtained, it is possible Video Center has not been provisioned for the organization. If the “org” script cannot be obtained, it’s possible the video player has not been provisioned for the org. If the Video ANS for the UUID cannot be obtained, it’s possible the video has not been published or that it has exceeded its pubEndDate.
window.powas
Any players that are created on a page get stashed on the window.powas
object. This object is keyed to the id of the powa element. The value of that key is another object which contains a reference to the powa
instance (i.e. the player), a reference to the powaTrack
array, and a reference to the powaTracked
array.
The powa instance is the player. All player methods are available via this reference (e.g. powa.getStatus()
).
The powaTrack
array is a log of the events emitted by the powa instance. It contains the event payload and timing information.
The powaTracked
array is a log of the previous video the player played (if there was one).
window.powaData
Any Video ANS data obtained via one of the Video APIs gets stashed to window.powaData
keyed on the UUID of the video. This is also a valuable source of information for MediaTailor
streams as data concerning the ads stitched into the stream is stashed here as well.
window.PoWaSettings
Player settings are referenced via window.PowaSettings
. Configurations such as maxBitrate
and streamPreference
are located on this object. The adTag
function and general ad settings are defined on PoWaSettings.advertising
. Player templates are hosted here (e.g. promo).
Debugging Tips
powaEmbed.html
If something else on the host page is interfering with the player (e.g. CSS), one way to determine that the player itself is fine is to use powaEmbed.html
. This page is hosted for all orgs at https://{org}.video-player.arcpublishing.com/{prod|sandbox}/powaEmbed.html?org={org}&uuid={uuid}
. Some organizations define their player CSS external to the player, so you may need to append the query string attribute powa-promo=default
in order for the player to render properly.
IMA Debugger
If the pre-roll ad is not working properly, one way to determine if the player is possibly at fault is to test the ad tag request URL in Google's IMA debugger. The adTagURL
field from an ad event can be obtained from any of the ad events from powaTrack
.