java - Playing live http stream in vlcj -
i'm trying use vlcj play live internet radio stations in project. i've played around sample programs few hours, cannot either sample programs or programs i've played around play stream url.
an example of url i'm trying play is: http://network.absoluteradio.co.uk/core/audio/wmp/live.asx?service=vr
is there special have in order vlcj play stream? couldn't find in api. (assuming can because can played through vlc media player!)
thanks lot
ok, mrl have provided http://network.absoluteradio.co.uk/core/audio/wmp/live.asx?service=vr mms server may pull asx (xml) metafile may contain @ least 1 sub-item.
http://all-streaming-media.com/faq/streaming-media/metafiles-asx-advanced-stream-redirector.htm
to able play type of streaming media , go through each sub-item, need following code snippet:
videopanel.getmediaplayer().setrepeat(true); videopanel.getmediaplayer().setplaysubitems(true); videopanel.getmediaplayer().preparemedia(media, options); try { thread.sleep(2000); } catch (interruptedexception e) { e.printstacktrace(); } for(string s: videopanel.getmediaplayer().subitems()) system.out.println(s); videopanel.getmediaplayer().play();
for example mrl above, list down sub-items follows:
http://wms.absoluteradio.co.uk/g1/absoluteradio.co.uk/prerolls/ar_account_1310455302_hi.wma mms://wms.absoluteradio.co.uk/absoluteradio.co.uk/vr_lo?u= http://wms.absoluteradio.co.uk/absoluteradio.co.uk/vr_lo?u= mmsu://wms.absoluteradio.co.uk/absoluteradio.co.uk/vr_lo?u= mmst://wms.absoluteradio.co.uk/absoluteradio.co.uk/vr_lo?u= mms://wms.absoluteradio.co.uk/absoluteradio.co.uk/prerolls/problems_lo.wma
to stop playing of them, set following code snippet:
videopanel.getmediaplayer().setrepeat(false); videopanel.getmediaplayer().setplaysubitems(false); videopanel.getmediaplayer().stop();
for better explanation, refer to: http://code.google.com/p/vlcj/wiki/howtohandleyoutubemedia
Comments
Post a Comment