[plugin] Youtube player

Post your completed addons to share with the community

Post » Tue Jan 12, 2016 8:59 am

Hi @rexrainbow,
Do you think the plugin could:

- hide control bar (user cannot play, stop, go forward by controls)
- detect if link is broke
B
17
S
4
G
1
Posts: 136
Reputation: 1,799

Post » Wed Jan 13, 2016 4:22 am

Update

Add property "Control bar" to disable control bar. But the video could still be paused or resumed by clicked.


@frcol
I only add the 1st requirement.
B
99
S
22
G
191
Posts: 4,173
Reputation: 110,709

Post » Wed Jan 13, 2016 2:49 pm

Great @rexrainbow!
B
17
S
4
G
1
Posts: 136
Reputation: 1,799

Post » Wed Jan 13, 2016 3:24 pm

This morning I came up with an idea that requires a stream player. You may imagine how happy I was to find this "fresh" plugin. Great work (as always) @rexrainbow :) THNX

Few questions/issues:

1. Is it possible to add a mechanism that will allow objects over the video? This would be very handy...

2. Is it possible to have a parameter that hides Youtube's info at the top (name/watch later/share)?

3. Is it possible to have a parameter that disables play/pause upon video clicked?

4. In order to run some tests I created this project that includes two Time-code counter videos running in-sync. Here are some of the results:
https://www.dropbox.com/s/62h7dg6p6psopv4/tube%20test.capx?dl=0

a. The plugin runs nicely over desktop and mobile via wifi, but its response is quite far from being accurate - the average response to action.pause is around 0.3 sec. Also - each player has a slightly different response time. You can test it by setting a desired pause time on the AutoPause variable.

b. When looping at the end of the video, the plugin shows the "suggestions" screen for a split second. I worked around this issue with the "clean loop" action (enable line 8 to activate "clean loop").

c. SetPlaybacktime does not work on "skip" (for example, when JumpFrom=3 and JumpTo=7)
The same action works fine on "repeat" (JunpFrom=7 and JumpTo=3)

When you use the capx, make sure to always close the tab you have used for the last preview (some inconsistency when re-launching a preview in a "used" tab).
B
12
S
3
Posts: 104
Reputation: 1,655

Post » Thu Jan 14, 2016 5:05 am

@rexrainbow
I implemented 2 new properties, 1 Condition and 1 expression:

properties:
- Show Info: informations that appears on top of the video
- Dissable keyboard: enable/disable keyboard to play/pause/forward etc

condition:
- onError: If the video return any error (2, 5, 101, 150), the plugin is triggering it now.

expression:
- ErrorMessage: brings the error number (works just using the ID property in edit mode, if loads the video by "load video" on runtime, it returns 150 most time).

Demo: http://fabiocolombini.comli.com/youtube/
Download: http://fabiocolombini.comli.com/youtubePlugin/youtube.rar

If you wanna take a look at it, I commented all my modifications with "frcol".
I really hope you don´t care about it. I just needed these functionallities and implemented. So, if I have it working, the best thing to do is share it. And I think it´s not fair to rename it and put in another place for downlaod, because all the credits is for you. If somehow you don´t like it, just tell me what to do.
I REALLY aprecciate your work and wanna humbly help.

@MaorKeshet
1- I think it´s not possible because it´s a DOM element <iframe>
2- I think it´s working.
3- The click on the video, i think it´s not possible. I didn´t find anything about it in Youtube API.
B
17
S
4
G
1
Posts: 136
Reputation: 1,799

Post » Thu Jan 14, 2016 5:54 am

@frcol

Thanks for sharing these code, I would merge them as soon as possible.



Here is a solution to get video info like url of webm video by video ID.
But I could not run it locally, error message No 'Access-Control-Allow-Origin' header is present... had shown. ( The data could be fetched by browser directly. )

Any idea?
B
99
S
22
G
191
Posts: 4,173
Reputation: 110,709

Post » Thu Jan 14, 2016 6:56 am

Update

- Add property "Show info", "Keyboard control".
- Add trigger "condition:On player error" and expression:ErrorCode to get error code while error occurred.

Thanks for sharing these code, @frcol
But I rename expression:ErrorMessage to expression:ErrorCode since the error data is a number.
B
99
S
22
G
191
Posts: 4,173
Reputation: 110,709

Post » Thu Jan 14, 2016 7:58 am

Ok @rexrainbow
I´ll update here.
B
17
S
4
G
1
Posts: 136
Reputation: 1,799

Post » Thu Jan 14, 2016 9:04 am

Thnx for the update @rexrainbow and @frcol

I just found this suggested solution for non-floating iframe http://www.electrictoolbox.com/float-div-youtube-iframe/ He also suggests control over youtube's suggestions display at the end of the video. I'm not a programmer, but it seems that this solution could be implemented quite easily. Is it possible?

SetPlaybacktime does not work on "skip" (for example, when JumpFrom=3 and JumpTo=7)
The same action works fine on "repeat" (JunpFrom=7 and JumpTo=3)

@rexrainbow - Is this a Youtube API issue or a bug in the plugin?

I understand that disabling the mouse is not possible via API.
In my game, on mouseclick.YoutubePlayer I want events to occur while the youtube player keeps playing. Does anyone have an idea for a work-around?
B
12
S
3
Posts: 104
Reputation: 1,655

Post » Thu Jan 14, 2016 9:14 am

@MaorKeshet

SetPlaybacktime does not work on "skip" (for example, when JumpFrom=3 and JumpTo=7)
The same action works fine on "repeat" (JunpFrom=7 and JumpTo=3)

Could you provide a simple capx for this bug?


All html elements like textbox object in C2 could not be overlapped by other sprites, since html element is not in canvas. They are at the top of all sprites.
I tried to find a solution to play youtube video by official video plugin, which could be overlapped by sprites (ideally, I had not tried yet) , but had not success yet.
B
99
S
22
G
191
Posts: 4,173
Reputation: 110,709

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 4 guests