File tree Expand file tree Collapse file tree 3 files changed +27
-2
lines changed Expand file tree Collapse file tree 3 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 65
65
< div class ="justify ">
66
66
文字两端对齐文字两端对齐文字两端对齐文字两端对齐文字两端对齐
67
67
</ div >
68
-
68
+ < video controls muted ="muted ">
69
+ < source
70
+ src ="http://aliyun36001.baomihua.com/05a0198bd7508ba99d9f54a6cb2c6945/5ced504f/3958/39574859_7_9a8aece27abb14c4d6f431752b2e8045.mp4 "
71
+ type ="video/mp4 ">
72
+ </ video >
69
73
</ body >
70
74
71
75
</ html >
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { bindPloyfill } from '../bind_applay_call/bind.js'
8
8
/* memory monitor */
9
9
import monitor from '../memoryMonitor/index'
10
10
11
-
11
+ import { reqVideoPictureInPicture } from '../video/index.js'
12
12
13
13
14
14
Original file line number Diff line number Diff line change
1
+
2
+ export function reqVideoPictureInPicture ( ) {
3
+ let video = document . getElementsByTagName ( 'video' ) [ 0 ] ;
4
+ video . style . width = '1000px' ;
5
+ video . style . height = '1000px' ;
6
+ video . width = 1000 ;
7
+ video . height = 1000 ;
8
+ video . addEventListener ( 'canplaythrough' , function ( event ) {
9
+ const promise = video . play ( ) ;
10
+ promise . then ( ( ) => {
11
+ video . removeAttribute ( 'muted' )
12
+ console . log ( video . volume )
13
+ } )
14
+ document . addEventListener ( 'click' , function ( ) {
15
+ video . requestPictureInPicture ( ) ;
16
+ video . volume = 1 ;
17
+ } )
18
+ } )
19
+ }
20
+
21
+ reqVideoPictureInPicture ( ) ;
You can’t perform that action at this time.
0 commit comments