Merge branch 'feature/video-native-timeline' of https://github.com/arillo/spacedeck-open into arillo-feature/video-native-timeline

This commit is contained in:
mntmn
2020-11-23 12:23:10 +01:00
4 changed files with 30 additions and 26 deletions

View File

@@ -52,9 +52,18 @@ function setup_directives() {
}
var play_func = function() {
video.play();
player_state = "playing";
update_view();
var playPromise = video.play();
if (playPromise !== undefined) {
playPromise.then(_ => {
// Automatic playback started!
player_state = "playing";
update_view();
})
.catch(error => {
// Auto-play was prevented
// Show paused UI.
});
}
}
var pause_func = function() {