play video without download vitamiob4a-library

ykucuk

Well-Known Member
Licensed User
Longtime User
Hello,
is there way play stream wihtout user download vitamiob4a-library on android market ?

Also when i try to use phone library is red color. I checked i have libraries file in internal folder

Any help ?

Thank you
 

ykucuk

Well-Known Member
Licensed User
Longtime User
Thanks erel.
could you give me link for sample ?

forget about red. its ok now.

thank you
 
Upvote 0

abner69

Member
Licensed User
Longtime User
Your Example

Here is a quick Sample for you...

You will need the Audio Library (v.1.30)

B4X:
Sub Globals
Dim Video As VideoView
Dim Panel1 As Panel
Dim ServiceLink As String="http://media.newspring.cc/video/2013/021013_DontWasteYourLife_01_iPod.mp4"
Dim ServiceFile As String="021013_DontWasteYourLife_01_iPod.mp4"
Dim StreamVideo As Boolean
End Sub

Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Sermon") ' Change this to your Activity Layout
Panel1.Color=Colors.black

Video.Initialize("Video1")

Panel1.Addview(Video,0,0,100%x, 100%y)
StreamVideo=True 'to play video file, change to false


If StreamVideo=True Then
Video.LoadVideo("http",ServiceLink)'Setup for Streaming
Else
Video.LoadVideo(File.DirDefaultExternal,ServiceFile)'Setup for Loading Video
End If

Video.Play

End Sub

Sub video1_Complete
'Video finished, so We end App
Activity.Finish

End Sub

you will also need to add this to manifest if you want to stream video:
B4X:
AddPermission("android.permission.INTERNET")

Hope this helps!


...Pablo
 
Upvote 0
Top