vjs_pause function does not exists in swf mode - video.js

With video.js 4.0.3, I got this error when using the flash mode :
Uncaught exception: TypeError: 'this.el_.vjs_pause' is not a function
Error thrown at line 2772
No problem with HTML5 mode.
The pause function seems to be unavailable in the flash object

I ran into this same JS error few days back. The fix that worked for me was to first check if the video element or it's parent is visible or not. Only when it's visible, trigger the pause method.
Hope this helps!

Related

Can't display an alert using MessageBox in Sencha Touch 2

In a handler in one of my controllers, I'm running into issues displaying a simple alert message. Using Sencha Touch 2.4.1
Ext.Msg.alert('Status', 'test');
--> "Uncaught TypeError: Cannot read property 'alert' of undefined"
As per these instructions, I added the following require statement: Ext.window.MessageBox to my controller.
--> Failed to find any files for /PATH/FILE.js::ClassRequire::Ext.window.MessageBox
Replaced Msg with MessageBox and removed require statement.
Ext.MessageBox.alert('Status', 'test')
--> "Uncaught TypeError: undefined is not a function"
Ran into the same problem when using .confirm.
Here's the docs - looks like it should work.
Anybody know why it doesn't?
I needed to require Ext.MessageBox instead of Ext.window.MessageBox and had to use Ext.Msg.alert... instead of Ext.MessageBox.alert... though I'm not totally clear on why.
Saw this in the docs: "The framework provides a global singleton Ext.Msg for common usage which you should use in most cases."

My app freezes and I don't know what's wrong

So, my app works perfectly except that it freezes after a while of using it in the simulator. Any ideas?
The following error occurs:
App Game[6352:60b] *** Assertion failure in -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:animation:], /SourceCache/UIKit/UIKit-2935.137/UIWindowController.m:223
2014-04-18 11:32:43.237 App Game[6352:60b] *** WebKit discarded an uncaught exception in the webView:didFinishLoadForFrame: delegate: <NSInternalInconsistencyException> Attempting to begin a modal transition from <ViewController: 0x15f625180> to <GADWebAppViewController: 0x15f53e5d0> while a transition is already in progress. Wait for viewDidAppear/viewDidDisappear to know the current transition has completed
2014-04-18 11:32:49.603 App Game[6352:60b] Warning: Attempt to present <Game: 0x15f659030> on <ViewController: 0x15f625180> while a presentation is in progress!
Just dealt with this problem. I was using the SimpleAuth to authenticate Instagram for an app, and found out that I was calling the SimpleAuth authorize method twice. The second call was causing this error by trying to present it's own modal before the first call had dismissed it's own.

dojo errors in Xpages

Using Notes 8.5.3, UP1, I have a long XPage which uses a lot of ExtLib functions. I'm also using TinyMCE and a jQuery table of contents, described here: http://xomino.com/2012/08/26/jquery-in-xpages-14-toc-create-a-menu-to-scroll-to-a-form-section/. When I create a new document it works fine and saves properly. However, once it's opened in edit mode again, I get the following errors in Firebug:
TypeError: node is null
dojo.js, line 14.
Error parsing in _ContentSetter#Setter_view:id1:id9:callback:tabName_pane_6
file "xsp/.ibmxspres/.mini/dojo/.en-us/#Fv&#EOb&#EOd&#EOf&#Ek&#Es&#Ie&#Ig.js", line 82
Error undefined running custom onLoad code: This deferred has already been resolved.
file "xsp/.ibmxspres/.mini/dojo/.en-us/#Fv&#EOb&#EOd&#EOf&#Ek&#Es&#Ie&#Ig.js", line 82
Basically, these errors are preventing any SSJS from being triggered at all. Any suggestions on how to debug this?

How do I catch 'Uncaught typeError: Cannot read property 'isModel' of undefined' during App load?

I'm developing ST2 on Chrome which uses localstorage. From time to time, it appears that the storage schema gets corrupted. When this happens, my app fails during load with "Uncaught typeError: Cannot read property 'isModel' of undefined". The only way to get my app running is to do localstorage.clear() in the console.
I'm assuming this is an ST2 bug, since the occurrence of the corruption seems unrelated to my code, or what I do in my app.
My main question is how do I catch the exception in such a way that either the app can recover, or the user is alerted as to what is going on? Right now, the app simply fails to load. I've tried wrapping the Ext.application() in app.js, but that is executing correctly. My launch function is not being reached.
There must be some weird thing going on with your app. Probably you have found the reason meanwhile and recognised the failing bit is somewhere in your app. Anyway if you are experiencing anything like this then probably the best bet is to catch the error event and do your error handling there. I.e.
window.addEventListener("error", function(errorEvent) {
//
// Add your error handling here
//
// if returns true, the error is suppressed and not thrown
return false;
});

Adobe Air HtmlLoader - quietly failing

Hi I am trying to load page into Air using the htmlLoader class. What event listener will I need to attach to the HTMLLoader class in order for it to notify me when the page can not be loaded.
Any help much appreciated
The only event fired directly from the HTMLLoader that appears to be error handling is:
uncaughtScriptException
Signals that an uncaught JavaScript exception occurred in the HTMLLoader object.
however when you call send and pass along a URLRequest you should be able to add listeners to the Loader, from an example in the docs, this should be good enough:
dispatcher.addEventListener(Event.COMPLETE, completeHandler);
dispatcher.addEventListener(Event.OPEN, openHandler);
dispatcher.addEventListener(ProgressEvent.PROGRESS, progressHandler);
dispatcher.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
dispatcher.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
dispatcher.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
in your case I'm guessing you'll need to use the HTMLLoader instance's loaderInfo property and add the listeners there.
Hope this helps.