Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

OnComplete function to load image


Good Morning all,

I am having a new interesting Dilema, I got informed iOS (iPhone specifically) devices open players in full screen all the time, and now i have hotspots active but they dont goto the full screen. But i know when the video finishes it goes back to the normal view.

So what i thought was to have the hotspots active on video stop and onComplete it will load a new image that will be in the dialog so users can se where to "click"


So now i have tried all of these methodes, and I know they work mostly because if I place "alets:"Testing"," I get the alert dialog, but in all of them the image doesnt seem to change at all.

<div id="myElement" class="embed-responsive-item" data-video="testing.m3u8">
Loading the player...
</div>

<script type="text/javascript">
var playerInstance = jwplayer("myElement");
var preBufferDone = false;
playerInstance.setup({
file: $("#myElement").data("video"),
stretching: "exactfit",
width:"100%",
aspectratio:"16:9",
hlslabels:{
"2600":"720p",
"1000":"480p",
"900":"180p"
}
});

playerInstance.on('complete', function(e){
image: "./Images/oncomplete/01-whatami.png";
});
</script>

--------------------------------------------------------------------------
or using
playerInstance.onComplete function(e){
image: "./Images/oncomplete/01-whatami.png";
});
--------------------------------------------------------------------------
or having iether of those methodes in the setup like this

<script type="text/javascript">
var playerInstance = jwplayer("myElement");
var preBufferDone = false;
playerInstance.setup({
file: $("#myElement").data("video"),
stretching: "exactfit",
width:"100%",
aspectratio:"16:9",
hlslabels:{
"2600":"720p",
"1000":"480p",
"900":"180p"
},
onComplete: function(e){
image: "./Images/oncomplete/01-whatami.png";
})
});

1 Community Answers

Jessenia

JW Player Support Agent  
0 rated :

Hello,

This is true, Apple sets all videos to play on full screen by default in browsers playing on iOS devices with small screens (iPhones) and does not allow overlays either. We do not have a workaround for this, you could accomplish this in a mobile app using our SDK.

This question has received the maximum number of answers.