2017-09-15 2 views
1

Das ist mein Code mit 2 Videos. Der Code ist sehr einfach. Auf Webbrowsern funktioniert es gut. Ich wollte, dass es inline spielt, also habe ich gerade "playinsline" hinzugefügt.Ist es möglich, mehrere Inline-Videos zu spielen?

Ist es möglich, diese 2 Videos gleichzeitig abzuspielen?

<video width="320" height="240" autoplay controls playsinline loop muted id="a"> 
    <source src="https://hay.github.io/test/dog.mp4" type="video/mp4"> 
Your browser does not support the video tag. 
</video> 
<video width="320" height="240" autoplay controls playsinline loop muted id="b"> 
    <source src="https://hay.github.io/test/dog.mp4" type="video/mp4"> 
Your browser does not support the video tag. 
</video> 

https://jsfiddle.net/7nw5gLmk/

+0

also willst du video inline auf ios gerät ??? –

Antwort

1

Wenn Sie html5 Videos Inline über das Spielen in iOS-Gerät dann

config.xml

<preference name="AllowInlineMediaPlayback" value="true" /> 

HTML

sprechen
<video src="https://hay.github.io/test/dog.mp4" width="200" preload="true" style="background:black" webkit-playsinline playsinline/> 
<video src="https://hay.github.io/test/dog.mp4" width="200" preload="true" style="background:black" webkit-playsinline playsinline/> 

Hinweis: - Dies funktioniert und getestet für ios9 und ios10.

+0

Ja, es hat bei mir funktioniert. Das Problem war, dass ich die Ionic View App benutzte, um meine iOS App zu testen, aber eigentlich musste ich natives iOS erstellen, um zu arbeiten – FosAvance

+0

Sie können die Antwort als akzeptiert auswählen, wenn es half, also könnte es für andere hilfreich sein. :) –

Verwandte Themen