Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin 'CDVVideo' not found, or is not a CDVPlugin. #1

Open
lancevo opened this issue Mar 27, 2013 · 9 comments
Open

Plugin 'CDVVideo' not found, or is not a CDVPlugin. #1

lancevo opened this issue Mar 27, 2013 · 9 comments

Comments

@lancevo
Copy link

lancevo commented Mar 27, 2013

Hi there,
Thank you for your plug-in. I followed your instruction, and when I run CDVVideo.play(vidUrl, 'YES'), my console log says the CDVVideo is not found. Any ideas? I'm using cordova 2.5.0

@pr1001
Copy link
Member

pr1001 commented Apr 11, 2013

Hi, sorry I didn't see this earlier. Did you drop the .h and .m files into the right place? And update Cordova.plist to reference it? If so, it's possible that the latest versions of Cordova have a different plugin system...

@green17
Copy link

green17 commented May 22, 2013

Hi there, Thank you so much for your plug-in, just what am looking. Am getting the below in my console log though is there anything i have to do to ref a local file with the plugin?

2013-05-22 20:38:57.332 ourfood[18364:c07] [INFO] start playing video media/video/welcome.mp4
2013-05-22 20:38:57.334 ourfood[18364:c07] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[NSURL initFileURLWithPath:]: nil string parameter'
*** First throw call stack:
(0x14b012 0x25a1e7e 0x14adeb 0x10fb9b1 0x10fb93b 0x4010 0x66c41 0x6639e 0x667f8 0x25b56b0 0x1124765 0xcef3f 0xce96f 0xf1734 0xf0f44 0xf0e1b 0x33d27e3 0x33d2668 0x386ffc 0x2edc 0x2e35)
libc++abi.dylib: terminate called throwing an exception
(lldb)

@pr1001
Copy link
Member

pr1001 commented Jun 3, 2013

Ouch, that sounds like like the video URL is not getting passed along correctly. Do you have a complete stack trace at the exception? Is the exception being thrown in CDVVideo.m or MovieViewController.m? And to confirm, you are calling the video in Javascript with something like CDVVideo.play(stream, 'NO')?

@glemmaPaul
Copy link

Hello,

I had the same problem. I just changed a line that was broken (I think). I changed this:
NSURL *fileURL = [NSURL fileURLWithPath:soundFilePath];

to
NSURL *fileURL = [NSURL fileURLWithPath:movie];

I don't know if this is the possible fix, but it worked for me :)

Greetz

Paul

@pr1001
Copy link
Member

pr1001 commented Jun 15, 2013

Paul, that then means that your URL isn't an HTTP or HTTPS URL. Is is a file one?

Specifically, the lines you mention are:

NSArray *fileNameArr = [movie componentsSeparatedByString:@"."];
NSString *prefix = [fileNameArr objectAtIndex:0];
NSString *suffix = [fileNameArr objectAtIndex:1];
NSString *soundFilePath = [[NSBundle mainBundle] pathForResource:prefix ofType:suffix];
NSURL *fileURL = [NSURL fileURLWithPath:soundFilePath];

It's trying to look up the file inside the app bundle and expects the URL to be of the format movie.ext. Note that there is no file:///.

@glemmaPaul
Copy link

Yes i have changed the code because someway the soundFilePath variable was nil.

In the javascript code I wanted to play a recorded video from the capture class from Cordova. So it's not a reliable fix I think. But fileURL is giving a Exception because soundFilePath is empty.

Sorry for my bad english (Dutch person) and my lack of knowledge of Objective C haha! Just beginning to learn it!

@pr1001
Copy link
Member

pr1001 commented Jun 17, 2013

Sorry, I have no experience with Cordova's capture functionality. But yes, it's logical that the capture information doesn't correspond to an actual file in the app bundle.

And no need to apologize for your English, it's quite good! I'm also in the Netherlands and if you want to learn more about Objective-C, you could join our CocoaHeads meeting on Wednesday (2013-06-19).

@bmontenegro
Copy link

Hello, thank you for the pluggin. I have the same problem with the Plugin "'CDVVideo' not found, or is not a CDVPlugin". I am using phonegap 2.9.0. I have setup everything as instructed I think. Where should I put the *.h and *.m files. This is my project directory structure.

\Cordoba29
\Cordoba29\cordova
\Cordoba29\CordobaLib
\Cordoba29\MyProject
\Cordoba29\MyProject\Classes
\Cordoba29\MyProject\Plugins *
\Cordoba29\MyProject\Resources
\Cordoba29\MyProject.xcodeproj
\www

I have put them in the Plugins directory. Is this correct? Please help.

@cultron
Copy link

cultron commented Sep 1, 2013

Hi I'm fairly new to Cordova/Phonegap. I'm having trouble adding this plugin to the latest 3.0.8 version of Cordova with the config.xml, as opposed to the older Cordova.plist scheme. Can some provide some further instruction for including this plugin for projects using newer versions of Phonegap?
Thanks,
Matt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants