I am using the Adobe AIR SDK to develop an HTML/JavaScript app that needs to record video. I'm not using Flex or Flash Builder which can use <mx:VideoDisplay />
I know how to attach the camera video feed to a new window object via nativeWindow.stage. Is it possible to do something similar in a section of the html or an iframe? Or is there an html tag that AIR interprets like the <mx:VideoDisplay /> tag in ActionScript?
In the end the answer was not to attach the video feed to the HTML, but to load it in a Flash Player file. We ended up embedding JWPlayer into the app and having it play the video stream from the media server. However, something similar can be done to have a sort of video chat app. You can create a SWF file that implements the ExternalInterface class in ActionScript so you can expose necessary functions to JavaScript.
Related
How do i open a music file or a video file in VLC player or Window Media player by clicking a button on a webpage writter in HTML and JS.
This is not possible because it is managed by the client system. But... you could create a "pseudo protocol" in your system registry and assign it the VLC player.
For pseudo protocol I mean something like magnet torrent. ( magnet:?somedata )
Your pseudo protocol could be startvlc:yourdata.
Keep in mind that this operation must be done on all systems where you want to run your application.
I need to embed videos into my web application and have the following requirements:
The videos need to be automatically transcoded into different
resolutions
Playbackspeed needs to be selectable
Needs to work on mobile
I need to modify the player
The videos need to be uploadable by non software developers => user interface for video upload and management
The problem with embedding a video from a platform is that you usually have to use an iframe to do this. However if the iframe is from another domain, I don't have access to its content and therefor can't modify the player, because I can't access the video element residing in the iframe.
The modifications I need to make are the following:
Put markers at specific cuepoints in the timeline
Pause the video at the cuepoints
Display some additional information below the video when the cuepoint is reached
The only possible solution, that I found so far, is hosting a platform myself on a subdomain of my web applications domain and adjust the code of that platform to set the document.domain property to the domain of my web application. That way I would be able to access the video tag that is inside the iframe provided by the platform. The things that I don't like about that solution is that I would prefer not to host the platform myself and it would also be nice if I wouldn't need to modify the platform.
You can use video tag provided by HTML5.
<video>
<src = "your src here">
</video>
firstly create video according to all the resolutions and store it
then change the src for different types of resolutions using javascript web API
var videoplayer = document.getElementsByTagName("video")[0];
videoplayer.src = "new src here according to the resolution"
playback speed can also be changed using the same way
videoplayer.playbackRate = "value according to the user"
Here is an example for looking on modifying the videoplayer.
You can detect the speed of the user using javascript and render the source of video accordingly.
If you dont want to download anything to check the network speed then have a look at how to implement adaptive starting experience of video using service-worker.
I'm creating an application in phonegap on android 2.3.5.
I have a YouTube video in my app which I want to display in a similar way it displays on a browser (namely inside the browser window), however clicking the video image invoke an external video player that takes over the screen.
Is there a way to play the video inside a window in my app without it taking over the screen (the same way it displays on a web browser)?
Thank you.
To install the plugin, move www/video.js to your project's www folder and include a reference to it in your html file after phonegap.{ver}.js.
Create a directory within your project called "src/com/phonegap/plugins/video" and copy "src/com/phonegap/plugins/video/VideoPlayer.java" into it.
In your res/xml/plugins.xml file add the following line:
Once installed you will be able to play a video by calling:
window.plugins.videoPlayer.play(url);
The url parameter can be one of three types:
The file:// protocol to play something native to the device such as:
window.plugins.videoPlayer.play("file:///sdcard/MyMovie.mp4");
The http:// protocol to play something on the internet such as:
window.plugins.videoPlayer.play("http://path.to.my/file.mp4");
The http:// protocol pointing to a video on YouTube such as:
window.plugins.videoPlayer.play("http://www.youtube.com/watch?v=E0UV5i5jY50");
As long as your url has "youtube.com" and contains the video ID (i.e. the v parameter) the VideoPlayer should be able to start the YouTube app on your phone to play the video without any additional user interaction. However, if the phone does not have the YouTube app you are out of luck. In the future I may add a check for this that will ask the user to install the YouTube app first.
Sadly at this point in time the VideoPlayer does not support playing videos from your android asset directory. That is an enhancement for a later date.
So, there you go a pretty simple and easy to use plugin which can get you unstuck if you really need to play a video in your Android PhoneGap application.
Is it possible to determine how much of a Flash video has elapsed from Javascript code? This would be for videos that I have not created and have no control over, e.g. from Youtube, Vimeo, etc.
I don't need to control the video in any way, just need to see how far it has played and, if possible, total running time.
It is possible. But it will be dependent in part on which player you are using. If you are using an embeddable video player, instead of a custom player, the player will need to have a javascript method available to give this information.
In the case of YouTube, an API exists:
http://code.google.com/apis/youtube/js_api_reference.html
But if you build your own player, that loads in another player, for example the chromeless YouTube player for Actionscript 3 - you can monitor the playback with the part of teh application you build, and make it avaiable via the ExternalInterface in actionscript.
The Actionscript ExternalInterface class is the preferred way to handle communication between flash objects and javascript.
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html
I'm building a "channel chooser" for a set of mms:// streams (Microsoft Media Server): a simple web GUI that lets the user chose which channel to listen to. For reference, here is the list of streams I'd like to use. I would like users to be able to play those streams on my site with a simple "play/stop" control. Nothing fancy.
How should I attack this? Any ideas or pointers appreciated! New angles and hacks around the problem too.
Javascript or Flash players are of course preferable, but I haven't been able to find any player that plays mms:// streams. My back-end language is Django if that helps anyone get any ideas.
MMS will require the user to have Windows Media Player installed. I believe you can embed mms:// content directly in an HTML page using <object> and/or <embed> tags and if it's installed, the WMP browser plugin will play the content.
Here's an Embedded Media HTML Generator; enter your mms:// url here and use the generated HTML in your video player page template.