This repository was archived by the owner on Aug 23, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 46
46
video . currentTime = video . currentTime - 10
47
47
}
48
48
49
- document . onkeypress = ( e ) => {
50
- e = e || window . event ;
51
- e . code in keyMapping ? keyMapping [ e . code ] ( ) : _
52
- }
49
+ document . addEventListener ( 'keydown' , ( e ) => {
50
+ if ( e . code in keyMapping ) {
51
+ keyMapping [ e . code ] ( ) ;
52
+ }
53
+ } ) ;
53
54
54
55
$ ( function ( ) {
55
56
66
67
var hls = new Hls ( ) ;
67
68
hls . loadSource ( vid . hlsvideosource ) ;
68
69
hls . attachMedia ( video ) ;
69
- hls . on ( hls . Events . MANIFEST_PARSED , function ( ) {
70
+ hls . on ( Hls . Events . MANIFEST_PARSED , function ( ) {
70
71
video . play ( ) ;
71
72
} ) ;
72
73
} ) ;
Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ const isDev = require('electron-is-dev')
18
18
const ffmpeg = require ( 'fluent-ffmpeg' )
19
19
const async = require ( 'async' )
20
20
21
+ // This is required to re-enable autoplay. See:
22
+ // https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
23
+ app . commandLine . appendSwitch ( 'autoplay-policy' , 'no-user-gesture-required' ) ;
24
+
21
25
let mainWindow = null
22
26
let playerWindow = null
23
27
let bookmarksWindow = null
You can’t perform that action at this time.
0 commit comments