How to play a media file/stream from console in Android

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to play a media file/stream from console in Android

How to play a media file/stream from console in Android

When streaming, if you want to play a streaming URL, it can be inconvenient if the browser cannot recognize the URL as a media stream and downloads the content rather than using Gallery to play it.


To create this kind of media streaming, you need to write an apk to use VideoView to play the URL/media stream from the console.

Here is the command of how to play a media file or network stream from console.

Gingerbread

am start -n com.cooliris.media/com.cooliris.media.MovieView -d "<URL>"

      The URL can be file position or network stream URL, such as:

  • you can play a local file by:

am start -n com.cooliris.media/com.cooliris.media.MovieView -d "/mnt/sdcard/test.mp4"

  • You can also play a http stream by:

am start -n com.cooliris.media/com.cooliris.media.MovieView -d "http://v.iask.com/v_play_ipad.php?vid=76710932"

  • Or play a rtsp stream by:

am start -n com.cooliris.media/com.cooliris.media.MovieView -d "rtsp://10.0.2.1:554/stream"

ICS

am start -n com.android.gallery3d/com.android.gallery3d.app.MovieActivity -d "<URL>"

       The URL has the same definition of Gingerbread.

ラベル(2)
評価なし
バージョン履歴
最終更新日:
‎10-09-2012 12:40 AM
更新者: