File tree 1 file changed +6
-7
lines changed
1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -36,12 +36,10 @@ class VideoElement extends HTMLElement {
36
36
this . classList . add ( 'video' )
37
37
this . dataset [ 'videoId' ] = this . video . id
38
38
this . dataset [ 'date' ] = this . video . publishedAt
39
- if ( this . video . summary ) this . dataset [ 'summarized' ] = "true"
40
- else this . dataset [ 'summarized' ] = "false"
41
- if ( this . video . downloaded ) this . dataset [ 'downloaded' ] = "true"
42
- else this . dataset [ 'downloaded' ] = "false"
43
- if ( this . video . ignored ) this . dataset [ 'ignored' ] = "true"
44
- else this . dataset [ 'ignored' ] = "false"
39
+ this . dataset [ 'summarized' ] = this . video . summary ? "true" : "false"
40
+ this . dataset [ 'downloaded' ] = this . video . downloaded ? "true" : "false"
41
+ this . dataset [ 'ignored' ] = this . video . ignored ? "true" : "false"
42
+
45
43
this . innerHTML = /*html*/ `
46
44
${ this . video . downloaded
47
45
? /*html*/ `<div class="play video-placeholder" style="background-image: url(${ this . video . thumbnail } )"><div class="play-icon"></div></div>`
@@ -94,7 +92,8 @@ class VideoElement extends HTMLElement {
94
92
watchVideoHandler ( event ) {
95
93
event . preventDefault ( )
96
94
this . querySelector ( '.play.video-placeholder' ) . outerHTML = /*html*/ `<video controls width="400">
97
- <source src="/videos/${ this . video . id } " type="video/${ this . video . format } " />
95
+ <source src="/videos/${ this . video . id } " type="video/webm" />
96
+ <source src="/videos/${ this . video . id } " type="video/mp4" />
98
97
<track
99
98
default
100
99
kind="captions"
You can’t perform that action at this time.
0 commit comments