-
Notifications
You must be signed in to change notification settings - Fork 286
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
Preroll and main video play simultaneously on Android device, when main video is of type m3u8 #1098
Comments
Hello @tbourigault Android 6.0.1 is marked as no longer maintained. If you are able to develop a fix using using your device, I can take a look at the pull-request. Otherwise, the plugin may not be able to support that version of Android. I tested the sample you shared on the following device and saw playback happen as expected.
Thank you, |
Hello @Kiro705 I was able to reproduce it on more recent device also
Thank you |
I have the same issue, really weird to hear the audio of the 2 videos at the same time. @Kiro705 Any idea about this bug? must be a timing problem? The important point is to click on the player as soon as the video icon appears, knowing that I can reproduce almost every time. Does not seem to happen when we wait a few seconds or more. My phone is a Samsung Galaxy A51, Android 13. |
Hi 👋🏻 On my device: I was able to reproduce the bug using Chrome. I was able to reproduce the bug using Edge. Both audios can be heard simultaneously with this URL: I was unable to reproduce the bug with Firefox. |
Hello all, I was looking into this issue more, and have been able to reproduce it reliably, when making sure to play the video as soon as possible. Unfortunately, I have not been able to identify a fix for the issue, but will plan to take another look soon. Please let me know if any changes on your end seem to resolve this issue. Thank you, |
@floverdevel how are you being able to play mid roll and post roll ads. as i am only being able to play pre-roll ads. can you please share the code. |
I never tried yet to play mid-roll or post-roll ads. |
Your demo does not work properly on the iPhone user agent, |
Are there any plans of fixing it or workarounds? Maybe downgrade to some particular version? |
Here is my workaround, it doesn't solve the root issue but masks it for users: let tempVolume;
player.ima.addEventListener(google.ima.AdEvent.Type.STARTED, () => {
const adVideoEl = player.el().querySelector(".ima-ad-container video[src]");
tempVolume = player.volume();
player.volume(0);
adVideoEl.volume = tempVolume;
});
player.ima.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED, () => {
player.currentTime(0);
player.volume(tempVolume);
player.src(player.src());
player.play();
}
); So basically I mute video on ad start, then unmute and reload on ad end. |
Hi Everyone, Can you please advise this issue is fixed? Still I am facing this issue in VideoJS latest version |
When the video is started as soon as possible on an Android device and the main video is of type m3u8, the preroll and main video will start playing both at the same time, instead of playing the preroll first and then the main video. The preroll only is visible but we can hear the audio of the main video in the background.
I have made a copy of the simple example changing only the main video from a mp4 to a m3u8
original (mp4 no bug)
https://googleads.github.io/videojs-ima/examples/simple/
modified version (m3u8 bug)
https://tbourigault.github.io/IMA-SDK-Plugin-VideoJS-Simple-M3U8.html
Steps to reproduce:
Expected behavior:
The preroll ad should play first, followed by the main video.
Actual behavior:
Both the preroll ad and main video start playing at the same time. The preroll only is visible but we can hear the audio of the main video in the background.
Environment details:
Bug was reproduced on multiple android devices, different m3u8 files and versions of videoJS 7 & 8
one example:
Operating system: Android 6.0.1
Browser: Google Chrome (Version 106.0.5249)
Video player: video.js (Version 7.18.1) with the videojs-ima plugin (Version 2.0)
The text was updated successfully, but these errors were encountered: