Play audio file from server - audio

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

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.

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

Play online video using Google Cardboard in my Android app

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);

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

How to play RTSP on Google TV ( or use ffmpeg )

In short, I have to play RTSP on a Google TV device (Sony nsz-gs7). How can I do it?
Things I tried:
Use NDK to compile ffmpeg, then ffmpeg converts rtsp to udp etc. - Fails because NDK is not supported in Google TV (see: https://developers.google.com/tv/faq#ndk). This method uses ffmpeg as library.
Put ffmpeg executable (compiled with NDK) in an application, then call the app from command line. (see: http://gimite.net/en/index.php?Run%20native%20executable%20in%20Android%20App - first method). I can deploy executable and set its permissions, but cannot execute it; i get "not found" error (its path is correct). If only I could run an executable file in Google TV, the problem would be solved, I think.
Tried to display in VideoView, like Google TV VideoView playing YouTube rtsp videos, it didn't work either.
These approaches all work on Android phones, but I couldn't make them work on Google TV.
Any tips for displaying RTSP or running executable files? Or do I have to wait for NDK support?
Update: If there is an application which can play RTSP streams, we can also use it as a temporary fix.
The current version of Google TV is based on FFMpeg internally and is supposed to play RTSP content of course, if you try that example, you'll want to refresh the url for the RTSP content as YouTube doesn't keep them live long. Since RTSP is a transport format, not a codec, you might want to say what your encoding is.
That said, I've never made RTSP work myself - so I'm not speaking from experience, but I do trust my colleague Shawn who wrote the answer to the link above.
One of the features we announced at Google I/O 2012 was the ability to write your own transport stream and codec's in Java. That software is currently on the LG and will be on most of the others in the next few months.
If your need is urgent write me at Google or on Google+.

Resources