Video.js: TypeError: this.b.vjs_getProperty is not a function when hiding video

Created on 2 Sep 2013  Â·  15Comments  Â·  Source: videojs/video.js

See this fiddle:

http://jsfiddle.net/sHWHc/3/

When clicking "hide" in firefox, the following error is produced:

TypeError: this.b.vjs_getProperty is not a function

When showing and hiding the video again, the error occurs again, too.

This errors also happens when the video is inside a jqueryui accordion and the video is hidden there, for example.

(note: not sure why there is a Error: Permission denied to access property 'toString' error in the fiddle - I am not seeing this on my live system)

browser bug bug more info

Most helpful comment

Thanks for putting the example together. In the example it's using an FLV, which forces video.js to use the flash fallback. When you hide a Flash object in the browser, it gets disabled. If you care about the state of the video, you could try the fix suggested here: http://stackoverflow.com/questions/1291073/how-to-hide-flash-embeds-without-disabling-them

If you don't care about the state, you could kill the video player using the dispose() method, and rebuild it when it needs to be shown again.

In the future we could potentially build something into the player hide/show methods that detects if flash is in use before hiding, captures the video state and resets just the flash object when it's shown again.

All 15 comments

We get this issue in our application too. Any time we change page (thus removing the video element from the DOM) this error shows up in Firebug. It does not seem to have any adverse effects, nothing else appears to break. It would be nice to see these errors no longer showing up though.

still present in v.4.2.1

Thanks for putting the example together. In the example it's using an FLV, which forces video.js to use the flash fallback. When you hide a Flash object in the browser, it gets disabled. If you care about the state of the video, you could try the fix suggested here: http://stackoverflow.com/questions/1291073/how-to-hide-flash-embeds-without-disabling-them

If you don't care about the state, you could kill the video player using the dispose() method, and rebuild it when it needs to be shown again.

In the future we could potentially build something into the player hide/show methods that detects if flash is in use before hiding, captures the video state and resets just the flash object when it's shown again.

Another solution might be to set the player width/height to zero.

I've got the problem when hiding the video inside a jqueryui tab, see this link here for a real world example: At the bottom right, expand "Videos" and start the video, then hide the tab by opening another tab. So setting width/height to zero won't work in this case.

i have the same issu with bootstrap3 tabs and video.js:
javascript errors in firebug:

TypeError: this.a.vjs_getProperty is not a function
...rentSrc=function(){var a=this.a.vjs_getProperty("currentSrc");if(a==h){var c=thi...
video.js (line 97)

TypeError: a is undefined
....end(0)/this.duration():0};t.volume=function(a){if(a!==b)return a=Math.max(0,Mat...
video.js (line 50)

I got the same issue when hiding the video before disposing.

My workaround is to use cache such as videojs.cache_.currentTime or to check css-class such as goog.string.contains(videojs.el_.className, 'vjs-paused').

Firefox has updated its support of Flash, but I don't know if this issue was fixed. At minimum though they support MP4s now, so Flash will be used less.

Can anyone confirm if they're still running into this issue?

If so, would it help if we just caught the error and displayed an error that says that the player has been disabled? There's nothing we can do to prevent this issue (besides encouraging people to dispose the player first) and recovering from it would be very difficult.

Closing this per @heff's comment above. If anyone can confirm they're still running into this issue and thinks there's a way we can work around it, please comment so we can reopen this.

The problem remained.
http://youtu.be/fGfchrZv7QI

VideoJS version: 4.7.1
Browser: Chrome 36 and FireFox 31

I'm running into this error too. I'm using the latest vjs 4.7.1 and using mp4/flashfallback in the latest Firefox 31. I have the video in an overlay and upon closing the ovelray, this error occurs.

try updating to 4.7.2, it has an updated swf because 4.7.1 had problems with the swf. May or may not be fixed.

Thanks for your speedy response. It was worth a try but it’s still not fixed. Error:
TypeError: this.el_.vjs_getProperty is not a function video.js:6731"VIDEOJS:" "Video.js: currentTime unavailable on Flash playback technology element." TypeError: this.el_.vjs_getProperty is not a function

Thanks
On Aug 17, 2014, at 1:33 PM, Gary Katsevman [email protected] wrote:

try updating to 4.7.2, it has an updated swf because 4.7.1 had problems with the swf. May or may not be fixed.

—
Reply to this email directly or view it on GitHub.

Hi!

I see this error in v4.12.11 (on Chrome v43):

Uncaught TypeError: this.c.vjs_getProperty is not a function
t.g.currentSrc @video.js:139
M @video.js:68
s.currentSrc @video.js:77
b.Hls.fillBuffer @videojs.hls.min.js:3
b.Hls.checkBuffer_ @videojs.hls.min.js:3
e @video.js:14

Are you trying to hide the Flash fallback? If so, you _need_ to dispose it first. Flash simply will not play nice if you're trying to just set display: none or something along those lines.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

uikoo9 picture uikoo9  Â·  4Comments

kitsunde picture kitsunde  Â·  4Comments

stephanedemotte picture stephanedemotte  Â·  4Comments

d3x7r0 picture d3x7r0  Â·  4Comments

cshah123 picture cshah123  Â·  4Comments