[TW5] YoutubePlugin (tentative)

319 views
Skip to first unread message

Tobias Beer

unread,
Jan 10, 2015, 7:49:11 AM1/10/15
to tiddl...@googlegroups.com
Inspired by this discussion...


I set out to streamline and extend on the codebits I could find to create...


Have a go at it and let me know what you think.

Best wishes, Tobias.

Astrid Elocson

unread,
Jan 10, 2015, 8:48:50 AM1/10/15
to tiddl...@googlegroups.com
Hi Tobias,

That is utterly brilliant. My own contribution was pathetic in comparison :)

What you've done there also serves as a great practical example for intermediate users of how to use some of the more advanced TiddlyWiki techniques. I'm sure I will learn a lot from it.

– æ

BJ

unread,
Jan 10, 2015, 9:53:33 AM1/10/15
to tiddl...@googlegroups.com
It's looking good!
Maybe we could have a mime-type, like "video/x-youtube" and use the "canonical url" as well?

cheers
BJ

Tobias Beer

unread,
Jan 10, 2015, 10:51:06 AM1/10/15
to tiddl...@googlegroups.com
Hi BJ,

Thanks ;-)
 
Maybe we could have a mime-type, like "video/x-youtube" and use the "canonical url" as well?

Maybe, but I do prefer to add actual contents to that video tiddler ...on top of annotations,
which I currently am not granted with _canonical_uri being set ...why not?!?

Best wishes, Tobias.

Astrid Elocson

unread,
Jan 10, 2015, 11:16:27 AM1/10/15
to tiddl...@googlegroups.com
Incidentally, why does "_canonical_uri" start with an underscore when none of the other core field names do?

– æ

Tobias Beer

unread,
Jan 10, 2015, 11:20:48 AM1/10/15
to tiddl...@googlegroups.com
Incidentally, why does "_canonical_uri" start with an underscore when none of the other core field names do?

What is the reason for not just having it called uri anyway?

Best wishes, Tobias.

Jeremy Ruston

unread,
Jan 10, 2015, 11:38:47 AM1/10/15
to TiddlyWiki
On Sat, Jan 10, 2015 at 4:16 PM, Astrid Elocson <aelo...@gmail.com> wrote:
Incidentally, why does "_canonical_uri" start with an underscore when none of the other core field names do?

The name "_canonical_uri" was established by TiddlyWeb, and adopted by TW5 for compatibility. I agree that it's unfortunate that it belongs to a different naming style than we usually use.

Best wishes

Jeremy
 

– æ

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

RichShumaker

unread,
Jan 10, 2015, 5:58:25 PM1/10/15
to tiddl...@googlegroups.com, jeremy...@gmail.com
As always Tobias WOW.

It may take me a day to two to digest it all.
And I like that a lot.

Just starting to read everything so I may have missed this.
The Tiddlers you defined have a start and stop point but the Tiddlers you open don't show those start and stops.

I have said this before, the end goal would be to watch all the video segments on a specific subject via playlist.
So all Tiddlers Tagged 'Awesome' would show up in a video list and hopefully we could stitch them together somehow.
Not a playlist of videos but a playlist of video subsections, so you could disect a video into smaller bite sized parts to watch on specific subjects.

Rich Shumaker

RichShumaker

unread,
Jan 10, 2015, 6:18:53 PM1/10/15
to tiddl...@googlegroups.com, jeremy...@gmail.com
I get it now.
Not sure why it is doing this but I get what it is doing now.

The Tiddlers of just sections do indeed play from a start point to an end point, the first time.
On the hangouts I built with Astrid and Jed's help, when it works(silly javascript error), it shows brackets for the start to stop on the Tiddlers.

On your videos the start point on all videos is actually 00:00:00 and you are "Jumping Playback" to specific point.
If you play a Tiddler once it starts at the correct spot and stops correctly if you hit the Replay button it starts at 00:00:00.

Hope that makes sense and helps as well.

Rich Shumaker

Astrid Elocson

unread,
Jan 10, 2015, 6:34:57 PM1/10/15
to tiddl...@googlegroups.com
Hi Rich,


> On your videos the start point on all videos is actually 00:00:00 and you are "Jumping Playback" to specific point. If you play a Tiddler once it starts at the correct spot and stops correctly if you hit the Replay button it starts at 00:00:00.

Interestingly, I get that effect on Chrome, but not on Firefox. Hitting Replay on Firefox plays the correct segment of the video again.

– æ

Astrid Elocson

unread,
Jan 10, 2015, 6:44:25 PM1/10/15
to tiddl...@googlegroups.com
Hi Tobias,

I've now read through all your code at http://youtube.tiddyspot.com, and I did indeed learn a lot. Thanks for publishing it!

The only thing I couldn't fathom was the line in $:/plugins/tobibeer/youtube/list/annotations that says:

  <$link to=<<annotation>>>

I couldn't find anything that either set "annotation" as a variable or defined it as a macro.

I did notice that $:/plugins/tobibeer/youtube/macros/yt.js exports an extra *parameter* called "annotation", which never seems to be used. Is that somehow the answer?


A couple of other comments about $:/plugins/tobibeer/youtube/list/annotations:

* The filter step [prefix[Draft of]] is usually expressed as [has[draft.of]]. There could conceivably be a non-draft tiddler whose title started with "Draft of".

* Is <$set name=video value=<<currentTiddler>>> redundant? Nothing seems to use the "video" variable, and its value is already accessible (and indeed accessed) as the "yt-video" variable.

Must stop now. My head is spinning :)

– æ

RichShumaker

unread,
Jan 10, 2015, 7:43:50 PM1/10/15
to tiddl...@googlegroups.com
I just came on and read your thread Astrid.
It is what I was about to say FireFox good Chrome bad #heheh, oh and I wanted to say to Tobias again, wow.

Rich Shumaker

Tobias Beer

unread,
Jan 10, 2015, 8:20:23 PM1/10/15
to tiddl...@googlegroups.com, jeremy...@gmail.com
Hi Rich,
 
I have said this before, the end goal would be to watch all the video segments on a specific subject via playlist.
So all Tiddlers Tagged 'Awesome' would show up in a video list and hopefully we could stitch them together somehow.
Not a playlist of videos but a playlist of video subsections, so you could disect a video into smaller bite sized parts to watch on specific subjects.

That is a great idea...


Let me think about this for a moment.

Best wishes, Tobias.

Tobias Beer

unread,
Jan 10, 2015, 8:40:31 PM1/10/15
to tiddl...@googlegroups.com
Hi Astrid,
 
I've now read through all your code at http://youtube.tiddyspot.com, and I did indeed learn a lot. Thanks for publishing it!

Thanks for taking the time to go through it all!
 
The only thing I couldn't fathom was the line in $:/plugins/tobibeer/youtube/list/annotations that says:

  <$link to=<<annotation>>>

A (potential) bug and a lesson learned.
It was a remnant from a former list variable by that name.
The link widget ignored it as it's value was undefined and
defaulted to <<currentTiddler>> which was the right thing to do anyway. ;-)

I did notice that $:/plugins/tobibeer/youtube/macros/yt.js exports an extra *parameter* called "annotation", which never seems to be used. Is that somehow the answer?

Nope. Removed. Can't remember what I intended it for.
Perhaps from a time when there wasn't a title param yet.
 

The filter step [prefix[Draft of]] is usually expressed as [has[draft.of]]. There could conceivably be a non-draft tiddler whose title started with "Draft of".

Thank you, useful tip, fixed... and documented.


Is <$set name=video value=<<currentTiddler>>> redundant? Nothing seems to use the "video" variable, and its value is already accessible (and indeed accessed) as the "yt-video" variable.

It is... another remnant. Thank you, much appreciated!

Best wishes, Tobias.

Ed Dixon

unread,
Jan 10, 2015, 10:57:59 PM1/10/15
to tiddl...@googlegroups.com
WOW 

Tobias great job! A lot of your own time and effort had to go into this and I also really appreciate the fact that you acknowledged the works of some of the others involved in all this. I can not thank you enough and am really anxious to see this become a full plugin! LOVE IT!

Thanks,

Tobias Beer

unread,
Jan 11, 2015, 7:36:58 AM1/11/15
to tiddl...@googlegroups.com
As a reminder, please test, but don't just use it yet right away, because...

experimental => do test
not yet packaged as a YoutubePlugin
please don't use yet, may be restructured a lot, because...
will likely evolve to a more generic PlayerPluginMadiaPluginAnnotatePlugin, etc...
not sure about the PluginName

Especially the last bits!

Best wishes, Tobias. 

Chris Dent

unread,
Jan 11, 2015, 10:07:55 AM1/11/15
to tiddl...@googlegroups.com
On Saturday, January 10, 2015 at 4:38:47 PM UTC, Jeremy Ruston wrote:
On Sat, Jan 10, 2015 at 4:16 PM, Astrid Elocson <aelo...@gmail.com> wrote:
Incidentally, why does "_canonical_uri" start with an underscore when none of the other core field names do?

The name "_canonical_uri" was established by TiddlyWeb, and adopted by TW5 for compatibility. I agree that it's unfortunate that it belongs to a different naming style than we usually use.

Just for historical reference the name chosen was up for discussion for a long time (on tiddlyspace, in the tiddlyweb google group, on github, etc). There's various links from here: http://cdent.tiddlyspace.com/20121221

Here's a canonical_uri tiddler as JSON, for reference: https://tank.peermore.com/bags/cdent/tiddlers/purplechurch2.png.json

The reason for not using 'uri' is because that was already being used for the uri of the tiddler itself. The reason for the leading _ is because in TiddlyWeb there are core attributes on the tiddlers (bag, type, text etc) and then there is another attribute called fields which contains a custom dictionary of additional fields on the tiddlers. Canonical uri was  made a field (rather than core attribute) because it is optional (that is, not critical to TiddlyWeb's definition of a tiddler) and the leading '_' was used to indicate that it was system-oriented rather than user-oriented (a  convention borrowed from private variable indications in Python).

The existence of _canonical_uri was expressly for the purpose of allowing a single tiddler to act as what amounts to a proxy for a resource that exists elsewhere on the web. Thus, in the context of tiddlers you could refer to that other resource by its TiddlerTitle while still using it from its original place. A side effect was that you could keep tags and other metadata about the remote resource in the tiddler that points to the remote thing.

The feature is used quite a bit in Tank for handling images and other content that can be dragged and dropped into a wiki. The actual binary content is saved in S3 and a _canonical_uri tiddler created to point to it. I mostly did it to save on disk space, but it also means that bags that appear to contain binary tiddlers are not slowed down by the binary tiddlers.

If the name is unsightly within TW5, why not change it, and just do a translation in tiddlywebadaptor.js? It already has to do that to deal with TW5's non-nested handling of attributes+fields.

I hope that bit of info is of some use for people who might be curious.

RichShumaker

unread,
Jan 11, 2015, 7:02:22 PM1/11/15
to tiddl...@googlegroups.com
First
The feature is used quite a bit in Tank for handling images and other content that can be dragged and dropped into a wiki. The actual binary content is saved in S3 and a _canonical_uri tiddler created to point to it. I mostly did it to save on disk space, but it also means that bags that appear to contain binary tiddlers are not slowed down by the binary tiddlers.
That is awesome Chris and I need to get my TiddlyWeb working now as that is the single feature I have wanted the most.  A way to save data locally and just create a link to it.
Second
THANK YOU TOBIAS

I have been hacking up the YouTube plug in and WOW.
I know it will get better, I am just amazed at how good it is already.
I agree with Astrid as well that this is a great lesson on how to build TW5 Stuff.

So one question came up while I was hacking things up.
I created a 6 times winning video, because I could.
Here's the question, Can multiple video's appear in a single Tiddler using your YouTube stuff?
I tried but couldn't figure it out and will try some more today as it was fun to use and create.

This was not intended to be a 'thing' but I could do it so I did.
The end concept was to create a YouTube Sampler, again because I could and no other real reason.

Since you can start a video and stop a video at specific points you can create samples.
I thought of this as I saw a Ted Talk where they took Captain Kirk's dialogue and cut it up and used it as samples to rebuild phrases and things, pretty cool stuff.

Thanks again Tobias and Jed and Astrid and everyone in the community.

Rich Shumaker

Alex Hough

unread,
Jan 12, 2015, 6:32:36 AM1/12/15
to TiddlyWiki
Tobias,

It's an interesting development .... how  many other tool are there for annotating YouTube videos like this?


but I can see new users adopting TW because of vid annotation,  a special edition TW Vid Notes combined with TW Scholar, and we have a powerful collection of tools


best wishes

Alex

--

Tobias Beer

unread,
Jan 12, 2015, 9:30:08 AM1/12/15
to tiddl...@googlegroups.com
Hi Rich,
 
Here's the question, Can multiple video's appear in a single Tiddler using your YouTube stuff?

Via transclusion.
 
Since you can start a video and stop a video at specific points you can create samples.

I want to be able to autoplay, at least.
Start, stop only works once, not as looping.

Looping is currently possible for entire videos only
and the video needs to be listed in a playlist...


There's also this site, but it doesn't provide a way to embed things,
at which point their server may possibly go down thanks to the number of people using it...


Best wishes, Tobias.

Tobias Beer

unread,
Jan 12, 2015, 10:11:25 AM1/12/15
to tiddl...@googlegroups.com
Hi Rich,
 
Here's the question, Can multiple video's appear in a single Tiddler using your YouTube stuff?
I tried but couldn't figure it out and will try some more today as it was fun to use and create.

Just for the fun of it...


Best wishes, Tobias.

RichShumaker

unread,
Jan 12, 2015, 1:32:21 PM1/12/15
to tiddl...@googlegroups.com
Tobias that simply made me SMILE *:)* !!!

Got it, loops are only on full videos.
I was using triggers (somehow) to play the videos over and over when I press the button.
So I was manually looping it.
 
The crazy idea in my head was MakeyMakey to trigger YouTube inside TW and since I found mousetrap(Link 1, Link 2, Link 3) last night that crazy idea became less crazy.
Community Search is amazing and very helpful.

Build idea - Button inside TW for playing YouTube video that you assign to the keyboard and then map to MakeyMakey.
Add a drum loop and you have the next big YouTube World Sensation, Autotune for 2015 and I am R$ take that TPain.

Rich Shumaker

Alberto Molina

unread,
Jan 12, 2015, 8:42:38 PM1/12/15
to tiddl...@googlegroups.com
Hi Tobias and all,

I have created a demo of YouTube plugin working and MagicTabs plugin working together: youtabs.tiddlyspot.com
  • It shows a tab with annotations at the bottom of every video tiddler. 
  • It lacks a template tiddler to show the list of annotations (easy to add, but depends on your preferences).
The process of creating custom new magic tabs is explained in 5 easy steps. 

Regards,

Alberto

Tobias Beer

unread,
Jan 13, 2015, 4:06:41 AM1/13/15
to tiddl...@googlegroups.com
Nice one, Alberto,

This part of the documentation may be interesting
in terms of getting the list of annotations with timed links...

http://youtube.tiddlyspot.com/#Lists

Also, the (tentative) in the title of this thread truly means that I every much intend to change the plugin title and location again as I really don't want this to have a focus on youtube only but rather as a more general plugin wrapper to annotate different kinds of media with extensions like youtube to support embedding whichever media-type at a given start position / for a given start-end-frame.

Best wishes, Tobias.

RichShumaker

unread,
Jan 14, 2015, 2:09:08 AM1/14/15
to tiddl...@googlegroups.com
not sure about the PluginName

If you are making it more generic it depends on what you are going to play.
So if you are able to play audio streams, audio podcasts, YouTube Videos, Vimeo, other formats of stuff even 3d?
If it can do all that stuff then AnyPlayer or AllPlayer or maybe just simply ThePlayerPlugin
I liked the new TiddlyMap name so not really sure of a good Player name in the same vane.

Rich Shumaker 

Tobias Beer

unread,
Jan 14, 2015, 5:05:48 AM1/14/15
to tiddl...@googlegroups.com
I liked the new TiddlyMap name so not really sure of a good Player name in the same vane.

First I was thinking MediaPlugin but now I'm pretty sure it will be CuePlugin...
as it's main purpose is to cue in on a given point of a medium,
through annotations or otherwise just via embedding.

Best wishes, Tobias.

rich shumaker

unread,
Jan 15, 2015, 2:06:09 PM1/15/15
to tiddl...@googlegroups.com
I like CuePlugin and I can see teachers, students, and anyone learning to be interested in this TW solution.
I wonder if there are lists of YouTube videos that we could just get the YouTube ID's.
So you have a Chemistry YouTube ID list with names would be helpful.

That way you have most of the work already accomplished.

I am using YouTube in my TW more and more these days.

Rich Shumaker

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/_dqbubfSm1c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.

Ed Dixon

unread,
Jan 16, 2015, 4:22:36 AM1/16/15
to tiddl...@googlegroups.com
Rich I work with the Foundation for Learning Equality and our primary product KA-Lite (an open source program) may do exactly this to create an index for downloading of the Khan Academy videos. The program is python based so the programming may require some translation to javascript. I am not sure exactly how they get the YouTube ID's but will try and find out and share here. I find it amazing that so many of us seem to all share the same vision of what the TiddlyWiki Platform has to offer as an educational tool. Thanks to all and congrats to all of you in creating this TW5 plugin with the potential to substantially help improve education!  

All that said and because it is related, I am recruiting to create a cohort group to go through an online training program provided for free by Advanced Distributed Learning in developing educational solutions using the xAPI (also known as TinCan). I don't want to hijack this important thread for that cause but if any here are interested please see that thread (soon to be created) if you would be interested in joining me on this endeavor. I hope to use TW5 and other excellent plugins such as this as a base for the required project our team is expected to create as we progress in that program. I am also recruiting from other educational projects I am associated with so mixing, mingling, and plenty of fun are pretty much guaranteed but I need a few good TW5'rs with me so please do check it out! 

Thanks,

On Thu Jan 15 2015 at 12:06:09 PM rich shumaker <richsh...@gmail.com> wrote:
I like CuePlugin and I can see teachers, students, and anyone learning to be interested in this TW solution.
I wonder if there are lists of YouTube videos that we could just get the YouTube ID's.
So you have a Chemistry YouTube ID list with names would be helpful.

That way you have most of the work already accomplished.

I am using YouTube in my TW more and more these days.

Rich Shumaker
On Wed, Jan 14, 2015 at 2:05 AM, Tobias Beer <beert...@gmail.com> wrote:
I liked the new TiddlyMap name so not really sure of a good Player name in the same vane.

First I was thinking MediaPlugin but now I'm pretty sure it will be CuePlugin...
as it's main purpose is to cue in on a given point of a medium,
through annotations or otherwise just via embedding.

Best wishes, Tobias.

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/_dqbubfSm1c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+unsubscribe@googlegroups.com.

To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/_dqbubfSm1c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages