mirror of
https://github.com/spacedeck/spacedeck-open.git
synced 2025-12-15 17:37:30 +01:00
show native video controls when playing
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user