Android Question SNYoutube, why some videos are play and some not?

Santiago Barreiro

New Member
Licensed User
Hello
I am very new to B4A, so, in advance, sorry for any error.
I am developing an app for android that should allow the user to choose from a list, a youtube video in order to view the tutorial chapter.
With SNYoutube i download it, place the js file in the library, selected from the library manager and did all the steps:

B4X:
sub Globals
   Dim Youtube As SNYouTube
end sub

Then I Initialize the youtube object

B4X:
Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("Layout1")   
    Youtube.Initialize("keyname","key",Panel1)
End Sub

Finally, with a Button, I start the video, iVideoKey is the variable that holds the video ID and it is copied from a textbox.

B4X:
Sub Button1_Click   
    Youtube.loadVideo(iVideoKey)
    Youtube.play
End Sub

The issue is that with some videos it works so so, they start and pause every second, must be clicked in play to continue.
Others not event begin to play. For a while I guess it was the size of the file, but, some videos are 38 seconds long, and still not even start.

My viewpoint is that the LeadDroid simulator does not have a cache space for the video. But, is just a guess.

Thanks for the help.

Regards
 

mangojack

Well-Known Member
Licensed User
Longtime User
My viewpoint is that the LeadDroid simulator does not have a cache space for the video. But, is just a guess.


Welcome ...

Are you able to test on a real device to confirm your suspicion ?
 
Upvote 0
Top