video is not playing

ivavilagu

Member
Licensed User
Longtime User
I have the next code

B4X:
video.Initialize("video")
   Activity.AddView(video, 0, 0, 100%x, 100%y)
    video.LoadVideo(File.DirDefaultExternal, "/video/intro.mp4")
   video.MediaControllerEnabled = False
    video.Play
   Log(video.IsPlaying)
   Do While (video.IsPlaying = True)
   Loop

Into the log window the message is that video is not playing.
If I pause the execution on the last line the video is already playing without problems. It seems that when the execution arrives to the log line or to the do line the video has not yet begun. I need to pause the execution while the video is playing.

How can I solve that?

Thanks!
 

ivavilagu

Member
Licensed User
Longtime User
I have solved the problem adding the lines

B4X:
video.Initialize("video")
   Activity.AddView(video, 0, 0, 100%x, 100%y)
    video.LoadVideo(File.DirDefaultExternal, "/video/intro.mp4")
   video.MediaControllerEnabled = False
    video.Play
   Do While (video.IsPlaying=False)
      DoEvents
   Loop
   Do While video.IsPlaying 
   Loop
 
Upvote 0

ivavilagu

Member
Licensed User
Longtime User
Another little question,

how can I make a scrolling movie credit with automatic scroll? I tried scrollview but I am not able to get the effect.
 
Upvote 0

NJDude

Expert
Licensed User
Longtime User
Another little question,

how can I make a scrolling movie credit with automatic scroll? I tried scrollview but I am not able to get the effect.

For future reference, this question is not related to the original topic, it would be better you opened another thread. Keep the threads relevant.

And to answer your request, take a look at the attached sample, that will give you an idea on how to do a "scrolling credits".
 

Attachments

  • MovieCreditsSample.zip
    10.6 KB · Views: 178
Upvote 0

ivavilagu

Member
Licensed User
Longtime User
Thank you for the code and sorry for the forum mistake!
 
Upvote 0
Top