2017-01-17 9 views
0

Ich bin auf die Implementierung von Inline-Videos vor iOS10.Video Inline iOS funktioniert nicht

Ich habe bei Verwendung this library

suchen

Diese für die Inline-Videos auf iOS10 funktioniert, aber nicht für Pre iOS10.

I v bin mit 8.3 von iOS und v600.1.4 von Safari

Mein js sieht aus wie dieses

var video = $('video').get(0); 
makeVideoPlayableInline(video); 

video.addEventListener('touchstart', function() { 
    video.play(); 
}); 

Und die html sieht wie folgt aus

<video src='http://www.w3schools.com/html/mov_bbb.mp4' class="video-player video-one" id="video-background" autoplay muted playsinline> 
</video> 

CSS

.IIV::-webkit-media-controls-play-button, 
video::-webkit-media-controls-start-playback-button { 
    opacity: 0; 
    pointer-events: none; 
    width: 5px; 
} 
+1

Es gab einen [Bug in dieser Version.] (Https://github.com/bfredit-it/iphone-inline-video/issues/99) Es ist jetzt behoben –

Antwort

1

Haben Sie iphone-inline-video.browser.js wie in der Demo hier: https://github.com/bfred-it/iphone-inline-video/blob/master/demo/index.html?

<head> 
    <meta charset="UTF-8" /> 
    <title>iphone-inline-video demo with playsinline</title> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <script src="../dist/iphone-inline-video.browser.js"></script> 
    <link rel="stylesheet" href="style.css"> 
</head> 

Haben Sie auch die JS-Konsole in Ihrem Browser überprüft?

+0

danke. Ich habe es wirklich getan. Die Bibliothek wird geladen, danke –

Verwandte Themen