Play online video using Google Cardboard in my Android app - google-cardboard

I want to play video in my Android app and the video placed at my online server. The video is in YouTube 360 format.
I read about vrtoolkit and vrvideoview at github but it plays the video which is saved locally that is it is saved in Android device.
I want to my online video Google cardboard feature.
So what's best possible way to do it?

use uri to load the video
fileUri = Uri.parse( "http://your-url-to video file" );
videoWidgetView.loadVideo(fileUri);

Related

How to secure a video file played through Media Source Extension API?

I have made a web video player using the Media Source Extension API. The video and audio my player downloads and plays is not secure. As in you can go to the Network in Google Chrome Inspect and download the video and audio and play it through a media player. I want to make my audio and video files to be played via my video player only.
A perfect secure video files example is here. The video player: http://reference.dashif.org/dash.js/nightly/samples/dash-if-reference-player/index.html. U can insert the source in the input: https://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps.mpd. And when I download the files from Network in the Google Chrome Inspect, I cannot play the video file of .m4v in VLC or else where. So I think that this is secure. The files downloaded for playback can be found here: http://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps_1280x720_4000k.
Netflix has very very secured video files where the file try isn't even defined. So can someone advise me how to secure my video and audio files to be downloaded and played from else where. Thanks
A sample of my video player project: https://drive.google.com/file/d/156mDgIltBGMkXhx4LZfShxv3A8JrwkNP/view?usp=sharing
The m4v files can be played, you just need to append them to the initialization fragment. Netflix does not use Media Source Extensions directly. They use Encrypted Media Extensions along with a DRM provider such as widevine.

Play audio file from server

I followed the steps to create a sample app and it is doing perfect conversation with my custom agent created.
Can we play our own music or MP3 hosted in my server by a voice message to Google Home? Or I need to play an audio from my Android app that is installed in Android device which is paired with Google Home by sending voice message to it?
You can play audio files using the
<speak>This is the audio <audio>link/or/url/to/audiofile.mp3</audio></speak>
in your string response.
You can find more details in the SSML section

ionic video player for .ism/manifest files

Require a video player that can play .ism/manifest files. Currently I'm using Azure Media Player.It works fine in browser but not in Mobile devices. Any other player which I can integrate with my Ionic app?
In order to prepare your video to android playback follow article http://mingfeiy.com/android-hls-playback-via-azure-media-services.
You should be able to have links with following format (additional strings added after *.ism/):
For HLS v4
http://htmlsamples.origin.mediaservices.windows.net/7bbf1b9d-83c0-4745-8e3d-169479671fd6/Tears.ism/Manifest(format=m3u8-aapl)
For HLS v3:
http://htmlsamples.origin.mediaservices.windows.net/7bbf1b9d-83c0-4745-8e3d-169479671fd6/Tears.ism/Manifest(format=m3u8-aapl-v3)
Opening web browser from you app with these formatted links should trigger playback.
There is ionic related question not specific to azure media services: Play Video in landscape Full Screen in Ionic App which might help you as well

How to play azure video without using plugin

I am using html5 video tag but still I cannot play my azure video in IE 11,ipad,safari...i am using this below mentioned plugin to play my video in all the browser and to play in IE.
Plugin used to play video in IE:
amp.options.flashSS.swf = "//amp.azure.net/libs/amp/latest/techs/StrobeMediaPlayback.2.0.swf"
amp.options.flashSS.plugin = "//amp.azure.net/libs/amp/latest/techs/MSAdaptiveStreamingPlugin-osmf2.0.swf" .
so my question is How can I play my video in IE and safari without installing flash player and adding this plugin ??

Streaming with Azure media services

I have a media services account with a streaming unit and I have been able to upload a video and dynamically package into various streams. I am trying to have a webpage with the streaming url to be able to serve cross platform iOS, android, desktop etc.. How do I go about it.
PS: I was able to create a page with videojs and progressive download. I am tring to explore the other option with Windows Azure.
Thanks for any help.
Azure Media Services has shipped Azure Media Player which could automatically detect the capability of your browser or device, and request the appropriate streaming format- for instance, it will grab MPEG-DASH stream with EME enabled browser, or HLS for iOS devices. You could give it a try: http://amsplayer.azurewebsites.net/azuremediaplayer.html. Please contact yanmf#microsoft if you want to get into Private Preview for this player. It will be free for use when we launch very soon.
Take a look at JW Player and the Microsoft Media Platform Player Framework. Both offer plenty of playback options for progressive and adaptive streaming to a wide range of browsers and devices.
For desktop : Use OSMF plugin - Adobe + Smooth streaming URL
For iOS : Use HTML5 Video tag+HLS v3 URL
For Android : Use HTML5 Video Tag+HLS v3 URL or Dash.JS with Mpegh Dash URL
For Windows Phone : Use Dash.js + Dash.JS URL
Hope this helps...
Update1:
Azure has came up with their own Media player for streaming which will take care of playing video in all the devices.
For Demo and Test - http://www.aka.ms/azuremediaplayer
For Documentaion - http://azure.microsoft.com/blog/2015/04/15/announcing-azure-media-player/
The bitdash MPEG-DASH player works also out of the box for MPEG-DASH content, here you can see an example stream comming from Azure: http://www.dash-player.com/demo/streaming-server-encoder-support/?mpd=http%3A%2F%2Fsamplescdn.origin.mediaservices.windows.net%2Fe0e820ec-f6a2-4ea2-afe3-1eed4e06ab2c%2FAzureMediaServices_Overview.ism%2Fmanifest(format%3Dmpd-time-csf)&m3u8=undefined&autoplay=true&muted=false&usePoster=true

Resources