1

I use one attribute based on Video domain where I add the Youtube urls to be load in the WWSD or SDPanels.

I got my Youtube ID and everything is OK in Android, but in iOS the video is not load and keep Loading message.

Anyone know if is need do something more for iOS in GNX to solve it ?

thx.

Marc M
  • 37
  • 2

2 Answers2

0

For iOS we did a work around because we found the same problem.
In youtube you can find the URL of the video to play directly. For example: https://www.youtube.com/embed/8GzZ-kMHqUA?autoplay=1

After having that url for the video you can create an SDPanel with a variable of type Component. In the list of the video, you can call this SDPanel and load the url of youtube video. This way the user will have the ability to play the video from a the web page that will trigger the native video player in iOS without an extra tap.

Code example:

Event "GridTapFromWWSD"
  Composite
    PanelYoutubePlayer(VideoURL)
  EndComposite
EndEvent

In the panel: PanelYoutubePlayer you ll put a &variable based on the Component domain and in the Layout give this variable 100% (height, width) and set it as ReadOnly = true. Assuming you have a table like with: VideoID | VideoURL
You can get the VideoID on the parm:

parm(in:&videoID);

And in the panel create in the events the following:

Event Start
   for each
       where VideoId = &videoID
       &videoUrlComponent = VideUrl
   endfor
EndEvent

This way you can navigate your db table to get your video URL.

&VideoID -> Same Domain as your VideID att
&VideUrlComponent -> ComponentDomain

Franklin
  • 881
  • 1
  • 8
  • 28
  • Hi Franklin, thx, I was since these two days trying to do what you said but I cannot, the maximum that I got is create an sdpanel and in this sdpanel I create one component variable and in the events I put in the event start the &variable = 'my you tybe video from my channel' but I cannot success... I try it because I can open one webpage doing it but the video I cannot, Is you said to I create one panel that have an grid and inside put the event in the default action to call to sdpanel ? Its +/- what I try right ? thx. – Marc M Mar 04 '15 at 03:38
  • @MarcM can you edit your question and add your code? Also if you put in your component variable the following: http://www.google.com do you see the web page? please attach the code to see if I can help you. – Franklin Mar 04 '15 at 05:22
  • Hi Franklin, I just found what happeneed, the variable in the panel need to be ReadOnly = True, with just this set you solution start to work. thx. – Marc M Mar 04 '15 at 11:56
  • Hi Franklin I back with this theme, look I thought that was solved but is not :-), let me explain, I have one panelA where have a grid where the default action of the grid is call a panelB where I want to show the youtube video, so, in the panelA I call the panelB using panelB.call(PK) then the panelB i set parm(PK); ... *** its continue in the comment below*** – Marc M Mar 10 '15 at 18:50
  • *** continuation *** the att where is the url is AttEmbed that is a URL domain then I create one var &AttEmbed = AttEmbed and put the var and att in the panel so &AttEmbed is readonly and not show nothing, but the AttEmbed show the att content, I try put the var and att directly in the parm like you said above but I got nothing... can you pls help me to understand better how your workaround need to be construction to I got the solution ? many thanks – Marc M Mar 10 '15 at 18:50
  • I edited my response to try to solve the new req. @MarcM – Franklin Mar 11 '15 at 18:20
  • Hi Franklin, I feel like I was wrong in a very simple thing, My table have TRN001Id that is Num(4) and is a PK and TRN001VideoURL that is char(200) where is the URL, From the grid in my PanelA i call PanelB.Call(TRN001Id) the PanelB have parm(in:TRN001Id); and the event start I put the (for each where TRN001Id = &TRN001Id &Youtube = TRN001VideoURL) where &TRN001Id is based on TRN001Id att and the &Youtube is a component, I put the &Youtube in the panel and it is set as ReadOnly. *BUT* not worked. in adv I put the TRN001VideoURL in the panel and show de content, so where I wrong ?? ;-) thx – Marc M Mar 11 '15 at 18:47
0

Currently Youtube links to be used in the control Video for iOS must use the watch?v=VIDEOID URL format, like in: http//www.youtube.com/watch?v=8GzZ-kMHqUA . youtu.be host name is also accepted.

iOS generator internally converts the URL to the http//www.youtube.com/embed/VIDEOID format removing any additional parameters.

If you want to include additional parameters, you can use the solution provided by Franklin.

  • Hi Fabian, thx by your answer I try usint the youtube url format like you said writhing the url in the video attribute or in the component attribute I cannot got success, probably I doing something wrong, can you help me ? thx. – Marc M Mar 04 '15 at 03:41
  • Hi Fabian, I make many tests and really not work in iOS if i use the youtube url as watch?v=VIDEOID but in Android it works fine... I use EV3 U2 maybe you know any problems in EV3 U2 with this ? Because really the only work that work is using the VideoComponent Att like indicated above by Franklin, thx in advanced by your help. – Marc M Mar 09 '15 at 18:05