Reputation: 608
Is there any way to auto play videos using flow player in iOS devices? I have searched a lot and couldn't find out anything.
I have used the below code to display videos:`
<source src="file2.mp4" type="video/mp4">
<object id="flash_fallback_1" class="vjs-flash-fallback" type="application/x-shockwave-flash" data="flowplayer-3.2.7.swf">
<param name="movie" value="flowplayer-3.2.7.swf">
<param name="allowfullscreen" value="true" />
<param name="flashvars" value="config={'clip':[{'url': 'file2.mp4','autoPlay':true,'autoBuffering':true}]}">
</object>
</video>`
Upvotes: 2
Views: 2902
Reputation: 1
I think an autoplay option is possible on ios devices.
Follow the following configuration:
splash: true;
api.toggle();
where api comprises of methods and properties of flowplayerUpvotes: 0
Reputation: 559
You'll need to be using flowplayer HTML5. Follow their setup documentation
You can achieve this by manually installing flowplayer (I'm currently using v.5.4) to a div container via JavaScript, then accessing the fp objects "load()" method
Manual installation is explained here
I've left the video source blank because my load method will apply an array of sources to the fp object. I would include a valid url for your video poster, so your users aren't left with without hope ;)
HTML:
<div id="fp-cnt" class="container">
<video id="html5_video" poster="[URL]" >
<source type="application/x-mpegurl" src="[BLANK ON PURPOSE]">
<source type="video/mp4" src="[BLANK ON PURPOSE]"/>
</video>
</div>
JavaScript:
<script>
function loadFlowPlayer() {
// install flowplayer to an element with id "fp-cnt"
$("#fp-cnt").flowplayer({});
var _elm = document.getElementById("fp-cnt");
var _obj = flowplayer(_elm);
_obj.load([
{ mpegurl: "[URL]" },
{ mp4: "[URL]" }
]);
}
</script>
Hope this helps!
Upvotes: 1
Reputation:
Sadly impossible on iOS, user interaction is required to play video. On a related note, audio cannot be controlled via code either. Source
Upvotes: 0