File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -74,16 +74,21 @@ export default class VideoTexture extends Lightning.Component {
74
74
75
75
start ( ) {
76
76
const stage = this . stage
77
+ this . _lastTime = 0
77
78
if ( ! this . _updateVideoTexture ) {
78
79
this . _updateVideoTexture = ( ) => {
79
80
if ( this . videoTexture . options . source && this . videoEl . videoWidth && this . active ) {
80
81
const gl = stage . gl
81
82
82
83
const currentTime = new Date ( ) . getTime ( )
84
+ const getVideoPlaybackQuality = this . videoEl . getVideoPlaybackQuality ( )
83
85
84
86
// When BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DEBUGUTILS is not set in WPE, webkitDecodedFrameCount will not be available.
85
87
// We'll fallback to fixed 30fps in this case.
86
- const frameCount = this . videoEl . webkitDecodedFrameCount
88
+ // As 'webkitDecodedFrameCount' is about to deprecate, check for the 'totalVideoFrames'
89
+ const frameCount = getVideoPlaybackQuality
90
+ ? getVideoPlaybackQuality . totalVideoFrames
91
+ : this . videoEl . webkitDecodedFrameCount
87
92
88
93
const mustUpdate = frameCount
89
94
? this . _lastFrame !== frameCount
You can’t perform that action at this time.
0 commit comments