Hi guys,
As the title says, is there plans to include this? If not, is there an alternative way of displaying videos for now?
Thanks,
Rob.
Hi guys,
As the title says, is there plans to include this? If not, is there an alternative way of displaying videos for now?
Thanks,
Rob.
Hi Rob,
I had the same issue with my game, and I’m using media.playVideo() on the Mac as a replacement. It’s not perfect, but it’ll get the job done. However, from what I understand, media.playVideo is not supported on Windows, so you’ll have to write your own playback system for that, which (I think) would require Corona Enterprise.
My big takeaway from building a game with native.newVideo is to not have videos in my game ever again! haha. Between not being able to test in the simulator and the not having desktop support, it really made things more difficult.
Good luck!
Unfortunately we have had to remove support for media.playVideo() from recent versions of CoronaSDK for OS X as it relied on an older Quicktime library that caused Apple to reject Mac App Store submissions.
Support for native.newVideo() is what we want to do but I can’t say when it would be available.
@Perry Clarke: Thanks for the update. Unfortunately, this is a complete deal-breaker for bringing Doggins to OS X, as we have a number of video cutscenes that now have no way of being displayed. Is video a priority, or a back-burner “when we get to it”?
Thanks!
On OS X you can use a webview:
That’s a simple OS X native.newWebView( ) test app which has loaded a web page with a video on it (a very annoying video
@Perry Clarke: Thanks for the reply! I suppose I could create dummy HTML pages for each of my cutscenes and embed a video in each one. Pretty clunky, but I guess it would work? Does native.newWebView() create a new window, or just display the content within the main Corona window?
Thanks,
Probably a silly suggestion, and it would quite possibly suck performance wise, but could you convert the videos into a series of numbered images, 1 for each frame, and swap them out, like an animation, very quickly?
I know that’s a poor workaround at best, but if being just used on desktops rather than mobiles performance may be workable.
@Glitch Games: Thanks for the suggestion! We’re actually using that technique in one location in the game already, but ultimately it would be a LOT of frames to do it for every video in the game, and it would be really difficult to sync with sound. At this point we’ll just have to wait until native.newVideo() is added or media.playVideo() is restored.
Ah yea, I hadn’t thought about sound, that wouldn’t be fun to manage. Luckily we only have one video in our games, right at the end, and we didn’t much like it anyway so we’ve just pulled it. Naturally that’s not much of a solution for you though
I think playing your movies in a webview is more likely to yield desirable results than some sort of flipbook animation. With the proviso that it currently only works on OS X.
Sample project attached.
Taking this as an opportunity to try and drum up support for my long-suffering feature request for video to texture (as in, play video in the open GL layer). This one feature could be the answer to so many issues, including this one. Help me Perry Wan Kenobi, you’re my only hope!
Jason feel free do drum up support for this. I know several people would like this. But consider, Corona doesn’t really manage it’s own codecs. We depend on existing layers like OpenAL for audio support or API calls from the OS to play sounds. In our video support we are leveraging the OS’s own view controllers to show video. Grabbing a camera feed is pretty straight forward (at least on iOS, quite difficult to do on Android), but Video adds a whole other level of problems.
What video formats do we support? .mov? .mp4? .wmf? .avi? .fla?
What encoding do we support? H.264? MPEG-1, MPEG-2? H.263? and of course the various Audio formats?
It’s a really complex feature.
Rob
All valid points, Rob. I am aware that I’m sitting in the enviable position of coming up with cool ideas and then not having to actually build them out.
However, should CL put the engineering muscle required into sorting out all those nasty details, I stand ready to issue my standard bribe of a box of cookies. Perry already has one coming his way once drag-n-drop file importing makes its way onto desktop builds in the next week or so. (https://forums.coronalabs.com/topic/59624-support-for-drag-file-onto-desktop-app-icon/)
@Perry Clarke: Thanks for the suggestion. I’ve been traveling as well as developing my next game, so I haven’t had a chance to test it, but I plan to. I appreciate your help.
Just to keep poking at this, I was encouraged to see that the tvOS alpha already supports native.newVideo(). That’s a step in the right direction.
As for Rob’s point on video codecs and formats, I think any support would be preferable to no support. For starters, mirroring what is supported on iOS seems to make sense, as it is already a quite limited subset of codecs/formats, and many people are trying to develop cross-platform games and apps.
Hi Rob,
I had the same issue with my game, and I’m using media.playVideo() on the Mac as a replacement. It’s not perfect, but it’ll get the job done. However, from what I understand, media.playVideo is not supported on Windows, so you’ll have to write your own playback system for that, which (I think) would require Corona Enterprise.
My big takeaway from building a game with native.newVideo is to not have videos in my game ever again! haha. Between not being able to test in the simulator and the not having desktop support, it really made things more difficult.
Good luck!
Unfortunately we have had to remove support for media.playVideo() from recent versions of CoronaSDK for OS X as it relied on an older Quicktime library that caused Apple to reject Mac App Store submissions.
Support for native.newVideo() is what we want to do but I can’t say when it would be available.
@Perry Clarke: Thanks for the update. Unfortunately, this is a complete deal-breaker for bringing Doggins to OS X, as we have a number of video cutscenes that now have no way of being displayed. Is video a priority, or a back-burner “when we get to it”?
Thanks!
On OS X you can use a webview:
That’s a simple OS X native.newWebView( ) test app which has loaded a web page with a video on it (a very annoying video
@Perry Clarke: Thanks for the reply! I suppose I could create dummy HTML pages for each of my cutscenes and embed a video in each one. Pretty clunky, but I guess it would work? Does native.newWebView() create a new window, or just display the content within the main Corona window?
Thanks,
Probably a silly suggestion, and it would quite possibly suck performance wise, but could you convert the videos into a series of numbered images, 1 for each frame, and swap them out, like an animation, very quickly?
I know that’s a poor workaround at best, but if being just used on desktops rather than mobiles performance may be workable.