Phonegap Alternative - html

Is there an alternative for phonegap that supports changing playback rate for media (esp. audio)?
it looks that they don't have a property for that:
http://docs.phonegap.com/en/1.0.0/phonegap_media_media.md.html

The audio and video elements in HTML5 supports changing playback rates according to the spec. Unfortunately, this doesn't work in all players. I've managed to make it work everywhere except on Android and I expect wide browser support to be available soon, since the android developer team is working on it.
If you get into the nitty gritty details, note that setting playback rate only works on all platforms after you have received a timeupdate event where the currentTime attribute has been set to a nonzero number, except on iOS where it only works if currentTime is zero (so to make it work cross platform, you have to set it twice).

Related

HTML5 audio with HLS streaming with DVR timeshift on Samsung Internet

i am trying to make a web based streaming player (http://srv.deutschlandradio.de/themes/streamplayer/index.html) work for Samsung Internet (Samsung's Android stock browser), without success.
The stream plays, but I am unable to control it's position. It seems that Samsung's browser supports basic HLS streaming, but no seeking (nor live playing) of streams with DVR (DVR functionality allows viewers to pause, play, and rewind live streams for a certain time).
For example, audioElement.currentTime always returns 0, and changing it's value, it switches back to 0 every time.
This works fine on other browsers (as documented here: https://www.w3schools.com/tags/av_prop_currenttime.asp).
Is there any documentation on streaming support with DVR window for Samsung Internet?
I am asking Samsung directly at the same time, but as Peter O'Shaughnessy suggests I am posting it here. I still hope I am not the only one who tried to implement this on StackOverflow... Maybe there are some workarounds? MediaSourceExtensions are not supported either, as it seems.
Thanks!
The samsung browser, known as "Samsung Internet", does not seem to support MediaSource Extensions, see this thread for more details: https://github.com/SamsungInternet/support/issues/5
It behaves exactly as chrome without MediaSource extensions.

Cross-Browser WebRTC Video Viewer Only

I have been doing a lot of research into WebRTC for a project I am currently working on. I am aware that it is only supported in Chrome, Firefox, and now Opera. However, I am wondering if their is a cross-browser viewer solution that does not require a plugin. This way I could require that broadcasts be done from a webRTC compliant browser but viewers could use other browsers such as Safari or IE with watching/viewing capabilities only.
The application I am working on is used for small group broadcasts of 25 or less people with a single publisher/presenter.
Here is a list of the options/ideas so far.
Somehow have a html5 canvas element display the frames of the video on non-webRTC supported browsers. However, I also need to support audio as well and I don't believe there is anyway as of right now to feed the audio stream into the HTML5 audio element. This option may be dead before it is even considered...
Have a server subscribe to the webrtc stream and then create a HLS (HTTP Live Stream) stream that can then be consumed by a browser player (Possibly Flowplayer, it supports cross-browser HLS to the best of my knowledge). I have found that Web Call Server 4 from the guys at Flashphoner can do the conversion to HLS but it seems like overkill for a simple server that does the WebRTC to HLS conversion. Hoping that there may be some sort of node.js implementation out there to generate the playlist and files for HLS so there is low latency.
Any help from the community on this would be much appreciated. The question is pretty specific and I have been researching solutions for the last 2 months so I think it warrants a stack overflow post at this point.
-- UPDATE
There may be a 3rd option here, having users on non-webrtc supported browsers install a plugin. This would only be for Safari and IE but it may be a solution. One free plugin that can be distributed for an app based on my findings are [link]https://github.com/sarandogou/webrtc-everywhere It may be possible to use this plugin with something like Kuento for signalling and achieve a solution that will at least work on all desktop browsers until Safari and IE catch-up with WebRTC.

Stunted Functionality of html5 <audio> tag in mobile browsers

While testing the HTML audio tag, I came across two problems with mobile browsers. First, the "autoplay" attribute does not always function, so that the user needs to touch the "start" button on the screen. Second, a 1:09 recording, cuts off at about one minute with some browsers, but plays to completion with others. An example of the first problem is that autoplay works as it should using the Google Chrome browser on my desktop, but not on my Android (HTC EVO) mobile phone. An example of the second problem is that the mobile Chrome browser plays the audio file to completion on my phone, but the default browser that came with my phone cuts off about 8 seconds prematurely. The autoplay feature, however, works as it should on the "default" browser.
Are these problems caused by reduced functionality and memory when going from a desk or laptop environment to a smartphone environment?
Don't know about Android, but iOS has well-known limitations on HTML5 audio and video. Apple claims they are designed to save data charges, even though they apply even when you are on WiFi, or the assets are local as in an e-book.
The limitations include no preloading until some user interaction occurs, no looping, no inline replay on iPhone, no change of playback rate, no playing backwards, no volume control, etc. etc. See http://blog.millermedeiros.com/unsolved-html5-video-issues-on-ios/ for a good summary.

Video Streaming in HTML5

How does one go about streaming video in HTML5 ? I can go with using a single browser of the latest version if I have to.I need to be able to start playing from any location of the movie even if the entire video has not been loaded by the browser.
WebRTC ?
I've already seen this question and no one has answered.
Does not allow the viewer to skip to the middle of a video in any
browser. They must watch the video straight through start to finish,
which is not ideal.
This is the main point for streaming.
Currently if you want to use pure HTML5 and work cross-browser you are limited to progressive streaming with the <video> element.
While that still does allow the user to skip ahead via the scrubber or programatically by setting the .currentTime there will still be some buffering while the browser re-loads enough content to be comfortable playing smoothly.
Solutions like Smooth Streaming, HLS do not work across browsers today so you would require a Flash or Silverlight plugin, though with MPEG-DASH being recognized by the W3C there is some hope for the future as samples like this demonstrate http://dash-mse-test.appspot.com/release-notes.html
For today however if you want to stick with an HTML5 solution and you have source in a format the works with the browser then you should be fine
Chrome has implemented the Media Source API in the mean time. Hoping the rest will follow.
http://www.w3.org/TR/media-source/
Abstract
This specification extends HTMLMediaElement to allow JavaScript to generate media streams for playback. Allowing JavaScript to generate streams facilitates a variety of use cases like adaptive streaming and time shifting live streams.

Record audio using HTML5 Microphone?

Is it possible in any current browser (including, for instance, Chrome Canary)?
All the working examples I've seen are speech-to-text. Is there anything to either record audio or stream it to a server?
Update 4/30/2012:
The getUserMedia API is sloowwwwly making its way into browsers. It is in the latest version of Opera and apparently is in-progress in Chromium.
If you want a taste of how it will work, see: http://www.html5rocks.com/en/tutorials/getusermedia/intro/
There doesn't seem to be an implementation of this in current browsers.
There is a JavaScript API for getting access to microphone and camera planned:
http://www.whatwg.org/specs/web-apps/current-work/multipage/video-conferencing-and-peer-to-peer-communication.html#obtaining-local-multimedia-content
Also, have a look at this question:
How do I access navigator.getUserMedia()?
The standard versions of Chrome and Firefox fully support navigator.getUserMedia();
Numerous examples have been already made to record audio directly in the browser, in several formats even.
Here are a few examples:
This is a fully oriented project towards testing the limits and possibilities of the current state of webRTC
https://www.webrtc-experiment.com/RecordRTC/
I've personally made a record to mp3 library in JS sources can be found here:
https://github.com/nusofthq/Recordmp3js
Also for updates you can check the latest MediaStream Recording API proposal by the Media Capture Task Force. This is not yet implemented in the current browsers but it will in the near future.