Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google IMA ads not playing with DASH stream in iPhone simulation mode in Chrome browser #535

Open
krackjack234 opened this issue Oct 21, 2021 · 2 comments

Comments

@krackjack234
Copy link

Description

Google IMA ads are not playing with Dash stream on Chrome browser if we simulate for iPhone

Steps to Reproduce

Include step-by-step instructions on how to reproduce the issue:

  1. Enable iPhone simulation in Chrome browser
  2. Use a dash stream as source (e.g. https://dash.akamaized.net/dash264/TestCases/1a/sony/SNE_DASH_SD_CASE1A_REVISED.mpd)
  3. Use a sample Google IMA tag (eg. http://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/ad_rule_samples&ciu_szs=300x250&ad_rule=1&impl=s&gdfp_req=1&env=vp&output=xml_vmap1&unviewed_position_start=1&cust_params=sample_ar%3Dpremidpostpod%26deployment%3Dgmf-js&cmsid=496&vid=short_onecue&correlator=)
  4. Play the content

Expected Results

Preroll should play first followed by content

Actual Results

Preroll starts and gets stuck

Versions

videojs-contrib-ads version: 6.9.0

Video-js version: 2.11.0

videojs-ima: 1.11.0

Platforms

Browsers: eg. Chrome v94

OS/Devices: eg. Windows 10/Mac

Logs

Below error logs are printed when preroll gets stuck

dash.all.min.js:2 [1894][SourceBufferSink][video] SourceBufferSink error 
dash.all.min.js:2 [1894][SourceBufferSink][video] getAllBufferRanges exception: Failed to read the 'buffered' property from 'SourceBuffer': This SourceBuffer has been removed from the parent media source. 

If we remove ads, dash content plays successfully in chrome browser in iPhone simulation mode

Note

Same issue is seen on Tizen TV. In order to debug this issue, we used iPhone simulator on Chrome as the behavior and logs are matching

@krackjack234
Copy link
Author

More logs

[18][MediaPlayer] [dash.js 3.2.0] MediaPlayer has been initialized 
videoplayerlib.js:80096 [20][Protection] EME detected on this user agent! (ProtectionModel_21Jan2015) 
videoplayerlib.js:80096 [22][MediaPlayer] Streaming Initialized 
videoplayerlib.js:80096 [32][MediaPlayer] Playback Initialized 
ima3_debug.js:526 [Deprecation] 'HTMLVideoElement.webkitDisplayingFullscreen' is deprecated. Please use 'Document.fullscreenElement' instead.
ima3_debug.js:89 Origin trial controlled feature not enabled: 'trust-token-redemption'.
ima3_debug.js:89 Origin trial controlled feature not enabled: 'attribution-reporting'.
videoplayerlib.js:147727 #####on adrequest event#####
videoplayerlib.js:80096 [142][DashParser] Parsing complete: ( xml2json: 9.20ms, objectiron: 0.600ms, total: 0.00980s) 
videoplayerlib.js:80096 [157][StreamController] Switch to stream P1. Seektime is NaN, current playback time is null 
videoplayerlib.js:80096 [158][StreamController] Seamless period switch is set to false 
videoplayerlib.js:80096 [160][ManifestUpdater] Manifest has been refreshed at Thu Oct 21 2021 21:38:10 GMT+0530 (India Standard Time)[1634832490.645]  
videoplayerlib.js:153346 onloadstartEvent
videoplayerlib.js:80096 [324][Stream] No text data. 
videoplayerlib.js:80096 [326][Stream] No fragmentedText data. 
videoplayerlib.js:80096 [330][Stream] No embeddedText data. 
videoplayerlib.js:80096 [330][Stream] No muxed data. 
videoplayerlib.js:80096 [332][Stream] No image data

 [  0.081s] [ima.loader.AdsLoaderImpl] Requesting ads using new ads loader. 
bridge3.485.1_debug_en.html:938  [  0.083s] [ima.loader.AdsLoaderImpl] requestAds, processing external request. 
bridge3.485.1_debug_en.html:938  [  0.084s] [ima.loader.SequentialAdsLoader] Enqueued new request. 
bridge3.485.1_debug_en.html:938  [  0.085s] [ima.loader.SequentialAdsLoader] Starting request from queue. 
bridge3.485.1_debug_en.html:938  [  0.086s] [ima.common.CompanionAdsManager] Sufficient time not provided for initialization of AdDisplayContainer before request ads. 
bridge3.485.1_debug_en.html:938  [  0.098s] [ima.common.GptCompanionAdService] GPT companion ads service not available. 
bridge3.485.1_debug_en.html:938  [  0.237s] [ima.loader.AdXmlFetcher] Creating AdsRequestsMap. 
bridge3.485.1_debug_en.html:938  [  0.240s] [ima.loader.SequentialAdsLoader] Starting request from queue. 
videoplayerlib.js:147773 #####on onadManagerEvent event#####
videoplayerlib.js:159 VIDEOJS: ADS: Received adsready event (BeforePreroll)
videoplayerlib.js:80096 [1772][BufferController][video] Init fragment finished loading saving to video's init cache 
videoplayerlib.js:80096 [1774][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://dash.akamaized.net/dash264/TestCases/1a/sony/DASH_vodvideo_Track4.m4v , Range:0-758 
videoplayerlib.js:80096 [1777][BufferController][audio] Init fragment finished loading saving to audio's init cache 
videoplayerlib.js:80096 [1779][ScheduleController][audio] OnFragmentLoadingCompleted - Url: https://dash.akamaized.net/dash264/TestCases/1a/sony/DASH_vodaudio_Track5.m4a , Range:0-625 
videoplayerlib.js:80096 [1784][ScheduleController][video] Top quality video index has changed from undefined to 3 
videoplayerlib.js:80096 [1795][ScheduleController][audio] Top quality audio index has changed from undefined to 0 

VIDEOJS: loadmetadata event
videoplayerlib.js:134505 player.videojs_http_source_selector_initialized == false
videoplayerlib.js:80096 [1831][PlaybackController] Native video element event: loadedmetadata 
videoplayerlib.js:80096 [1846][ScheduleController][audio] OnFragmentLoadingCompleted - Url: https://dash.akamaized.net/dash264/TestCases/1a/sony/DASH_vodaudio_Track5.m4a , Range:3302-27629 
videoplayerlib.js:80096 [1853][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://dash.akamaized.net/dash264/TestCases/1a/sony/DASH_vodvideo_Track4.m4v , Range:42279-328008 
videoplayerlib.js:80096 [1873][ScheduleController][audio] OnFragmentLoadingCompleted - Url: https://dash.akamaized.net/dash264/TestCases/1a/sony/DASH_vodaudio_Track5.m4a , Range:27630-51761 
videoplayerlib.js:80096 [1884][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://dash.akamaized.net/dash264/TestCases/1a/sony/DASH_vodvideo_Track4.m4v , Range:328009-614453 
videoplayerlib.js:147681 
videoplayerlib.js:159 VIDEOJS: ADS: Received play event (BeforePreroll)
videoplayerlib.js:159 VIDEOJS: ADS: BeforePreroll -> Preroll
videoplayerlib.js:159 VIDEOJS: ADS: Triggered readyforpreroll event (Preroll)
videoplayerlib.js:147829 #####onReadyForPreroll event#####
videoplayerlib.js:147015 
EventManager {orientationChanged: false, options: {…}, closeWatchNext: false, selectedBitrate: 'Auto', selectedAudioLanguage: '', …}
 'mmmmm'
videoplayerlib.js:147023 #####onPlay##### 
{type: 'play', target: div#Viacom18_85cfbad5-22a7-428b-9773-940ef0b06870.video-js.vjs-default-skin.video_main.vjs-16-9.mai…, relatedTarget: undefined, defaultPrevented: false, preventDefault: ƒ, …}
index.bundle.js:1 play from app
videoplayerlib.js:153351 onPlayEvent from videoplayer component  
CustomEvent {isTrusted: false, detail: {…}, type: 'onPlay', target: text, currentTarget: text, …}
videoplayerlib.js:80096 [1951][PlaybackController] Native video element event: play 
videoplayerlib.js:80096 [1961][PlaybackController] Native video element event: playing 
bridge3.485.1_debug_en.html:938  [  1.292s] [ima.loader.AdsLoaderImpl] requestAds, processing internal request. 
bridge3.485.1_debug_en.html:938  [  1.293s] [ima.loader.SequentialAdsLoader] Enqueued new request. 
bridge3.485.1_debug_en.html:938  [  1.293s] [ima.loader.SequentialAdsLoader] Starting request from queue. 
videoplayerlib.js:80096 [1971][PlaybackController] Native video element event: pause 
videoplayerlib.js:147786 #####onAdProgressEvent#####
index.bundle.js:1 adprogress from app
videoplayerlib.js:80096 [1995][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://dash.akamaized.net/dash264/TestCases/1a/sony/DASH_vodvideo_Track4.m4v , Range:614454-890905 
videoplayerlib.js:80096 [2004][AbrController] [video] switching from throughput to buffer occupancy ABR rule (buffer: 14.930). 

bridge3.485.1_debug_en.html:938  [  1.489s] [VastAdSource] Setting fallback index to session context: 0 
bridge3.485.1_debug_en.html:938  [  1.490s] [VastAdSource] processInlineAd, successCallback with 1 ads 
bridge3.485.1_debug_en.html:938  [  1.490s] [VastAdSource] hasMoreAds, this.ads.length: 1 , this.currentAdIndex: 0 , this.numAdsSent: 1 
bridge3.485.1_debug_en.html:938  [  1.491s] [ima.loader.AdsLoaderImpl] dispatchAdsLoadedSdkEvent_, ads.length: 1 
videoplayerlib.js:147786 #####onAdProgressEvent#####
index.bundle.js:1 adprogress from app
bridge3.485.1_debug_en.html:938  [  1.705s] [UrlReporter] Reporting urls for event : show_ad 
bridge3.485.1_debug_en.html:938  [  1.705s] [UrlMacrosReplacer] No macro definition found for: UACH 
bridge3.485.1_debug_en.html:938  [  1.721s] [ima.admanager.BaseAdManager] Could not display companion ads. 
videoplayerlib.js:80096 [2394][ScheduleController][audio] OnFragmentLoadingCompleted - Url: https://dash.akamaized.net/dash264/TestCases/1a/sony/DASH_vodaudio_Track5.m4a , Range:51762-75789 
bridge3.485.1_debug_en.html:938  [  1.722s] [ima.loader.SequentialAdsLoader] Starting request from queue. 
videoplayerlib.js:146623 Ad event: loaded
videoplayerlib.js:159 VIDEOJS: ADS: Starting ad break
ima3_debug.js:549  [  2.430s] [Html5VideoDisplay] No valid AdMedia; setting url directly. 
videoplayerlib.js:80096 [2489][SourceBufferSink][audio] getAllBufferRanges exception: Failed to read the 'buffered' property from 'SourceBuffer': This SourceBuffer has been removed from the parent media source. 
videoplayerlib.js:80096 [2490][SourceBufferSink][audio] SourceBuffer append failed "InvalidStateError: Failed to execute 'appendBuffer' on 'SourceBuffer': This SourceBuffer has been removed from the parent media source." 
videoplayerlib.js:80096 [2491][SourceBufferSink][audio] getAllBufferRanges exception: Failed to read the 'buffered' property from 'SourceBuffer': This SourceBuffer has been removed from the parent media source. 
videoplayerlib.js:80096 [2491][ScheduleController][audio] OnFragmentLoadingCompleted - Url: https://dash.akamaized.net/dash264/TestCases/1a/sony/DASH_vodaudio_Track5.m4a , Range:75790-99987 
videoplayerlib.js:80096 [2502][SourceBufferSink][video] getAllBufferRanges exception: Failed to read the 'buffered' property from 'SourceBuffer': This SourceBuffer has been removed from the parent media source. 
videoplayerlib.js:80096 [2503][AbrController] [video] switching from buffer occupancy to throughput ABR rule (buffer: 0.000). 
videoplayerlib.js:80096 [2503][SourceBufferSink][audio] getAllBufferRanges exception: Failed to read the 'buffered' property from 'SourceBuffer': This SourceBuffer has been removed from the parent media source. 
videoplayerlib.js:80096 [2519][SourceBufferSink][video] getAllBufferRanges exception: Failed to read the 'buffered' property from 'SourceBuffer': This SourceBuffer has been removed from the parent media source. 
videoplayerlib.js:80096 [2519][SourceBufferSink][video] getAllBufferRanges exception: Failed to read the 'buffered' property from 'SourceBuffer': This SourceBuffer has been removed from the parent media source. 
videoplayerlib.js:80096 [2530][SourceBufferSink][video] getAllBufferRanges exception: Failed to read the 'buffered' property from 'SourceBuffer': This SourceBuffer has been removed from the parent media source. 
videoplayerlib.js:80096 [2531][SourceBufferSink][video] SourceBuffer append failed "InvalidStateError: Failed to execute 'appendBuffer' on 'SourceBuffer': This SourceBuffer has been removed from the parent media source." 

@alex-barstow
Copy link
Contributor

alex-barstow commented Apr 25, 2023

The Chrome emulator is not a perfect fidelity simulation of an actual iOS environment, so some playback anomalies are not wholly unexpected there. However, DASH playback is not supported on iPhones, so the fact that it does not work there is consistent with actual iOS. The fact that you have seen a DASH stream play successfully in the Chrome iOS emulator without ads indicates a problem with the emulator, not the player or this plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants