buggyj / mediaplayer

MIT License
2 stars 1 forks source link

Is it possible to integrate youtube annotation plug in with mediaplayer #3

Closed arunnbabu81 closed 7 months ago

arunnbabu81 commented 2 years ago

Is it possible to integrate youtube annotation plug in by tobibeer with the mediaplayer so that the annotations and timestamps comes below the mediaplayer.

Or is possible to add annotation option to the mediaplayer plug in similar to tobibeers plug in

buggyj commented 2 years ago

I am seeing a problem with the youtube js library that is stopping me implementing yt-end time, so until I find away around this problem it is not possible.

arunnbabu81 commented 2 years ago

Please try to make this work when you get enough time. It would be a nice addition.

Tobibeers plug in was working fine in my wiki. Did you check the javascript macros used in that plug in

arunnbabu81 commented 2 years ago

I am seeing a problem with the youtube js library that is stopping me implementing yt-end time, so until I find away around this problem it is not possible.

WIll the annotation feature be added to mediaplayer in the near future or shall i continue using the youtube annotation plug in by tobibeer for the time being.

buggyj commented 2 years ago

I can no longer reproduce the error.

you can can add yt-start and yt-end to the media tiddlers, and see if you find a bug.

arunnbabu81 commented 2 years ago

I can no longer reproduce the error.

you can can add yt-start and yt-end to the media tiddlers, and see if you find a bug.

How can i add yt-start and yt-end from the mediaplayer UI? I will have to open the video tiddler seperately (outside of the mediaplayer UI)for doing that ? i was thinking of a UI where the annotation tiddlers are created and organised below the mediaplayer and above the individual playlist controller.

Another thing i noticed is that the media annotation tiddlers position shift from below the video itself to above the tiddler title field after installation of mediaplayer plug in. Any idea what is causing it?

This is images shows the UI before installation of mediaplayer plug in Screenshot_20220213-184154_Tiddloid

This is the image of same youtube video tiddler after the installation of mediaplayer plug in. The annotation tiddlers are seen overlapping the tiddler toolbar

Screenshot_20220213-184013_Tiddloid

buggyj commented 2 years ago

Try disabling the plugin and see if the TW reverts to how it looked before.

The media player does not have a fixed UI, it is designed to be modified or changed completely. What is seen in the plugin is the UI that I use for playing music. I have a large number of mp3s that I organise into playLists using tags and drag and drop. If you want to emulate what is in yt annotations plugin then another template would be required.

arunnbabu81 commented 2 years ago

Try disabling the plugin and see if the TW reverts to how it looked before.

I will investigate and report back

The media player does not have a fixed UI, it is designed to be modified or changed completely. What is seen in the plugin is the UI that I use for playing music. I have a large number of mp3s that I organise into playLists using tags and drag and drop. If you want to emulate what is in yt annotations plugin then another template would be required.

Can you guide me how to make such a template

buggyj commented 2 years ago

I will make a simple template and put it on tiddlyspot

arunnbabu81 commented 2 years ago

Try disabling the plugin and see if the TW reverts to how it looked before.

I will investigate and report back

It was not due to mediaplayer, but due to stylesheet modification done for the tiddler tag fields

arunnbabu81 commented 2 years ago

I will make a simple template and put it on tiddlyspot

Any updates regarding the template

buggyj commented 2 years ago

It will be ready soon

arunnbabu81 commented 2 years ago

It will be ready soon

I have seen that you have made some new commits to the mediaplayer repo. Is it ready for testing ?

buggyj commented 2 years ago

I will put a new version on tiddlyspot tomorrow that you can have a look at.

buggyj commented 2 years ago

@arunnbabu81 I have put up a new version

There is a new tiddlyclip command to start an annotation

arunnbabu81 commented 2 years ago

@arunnbabu81 I have put up a new version

There is a new tiddlyclip command to start an annotation

Thank you so much. I just tried it now. Its awesome to see the media player and annotations together. I have one doubt. I saw the Chill summer vlog has annotations. But rest of the videos doesn't have annotations. How to start annotating those videos which doesn't have annotations.

I added new videos using the ytnotesrule and annotated them, but those videos are not opening in the mediaplayer tidddler.

Can you add an option to add some text to those annotated tiddlers.

buggyj commented 2 years ago

you drag and drop them onto the top part of the mediaplayer tiddler

image

buggyj commented 2 years ago

There are two youtube commands - one to add simple video and the other to added annotated videos. You cannot add annotations to simple video clips.

arunnbabu81 commented 2 years ago

you drag and drop them onto the top part of the mediaplayer tiddler

image

Now i understood. So we will have to drag and drop the video tiddler into the list of playlist at the top for annotating within the mediaplayer. That means if the video is part of a playlist, then I will have to drag and drop it again to the list of playlist at the top for annotating.

Can there a way to start annotating from the bottomindividual playlist if the video is part of a playlist instead of drag and drop the video again into the top list of playlist.

buggyj commented 2 years ago

The $:/bj/templates/playListYTNotations template can be modified to display addition text.

here is one possibility:

add this macro to the top of the template:

\define extra(tid) <$transclude tiddler="$tid$/extra" mode="block"/>

like so: image

and this to the bottom of the template:

<$macrocall $name="extra" tid={{{[<synctid>get[text]]}}}/>

like so:

image

you can then create extra content to be displayed when the annotation is playing, but creating a new tiddler with the same name as the individual 'slice' of the annotation follow by /text like so:

image

buggyj commented 2 years ago

You can see the name of an anotation by hovering the mouse over it - firefox will show the link at the bottom of the screen:

image

buggyj commented 2 years ago

here is a version with the automatic creation templates_playListYTNotations.json.zip

arunnbabu81 commented 2 years ago

here is a version with the automatic creation templates_playListYTNotations.json.zip

Thank you for explaining in detail. I will give feedback after using for a few days

arunnbabu81 commented 2 years ago

Can you update the plug-in to 2.0.4 in mediaplayer tiddlyspot

buggyj commented 2 years ago

ok, the tiddlyclip tid Ytdets is also updated

arunnbabu81 commented 2 years ago

These are my few suggestions

  1. The box next to the yt-end button shall be used to enter the title of the slice tiddler (which is by default parent tiddler name/slice) and it shall be edited manuallly. Currently the text typed in this box is being saved in the summaryfield of the slice tiddler.

  2. Can the extra tiddler be avoided and the text typed in the newly added text box below the timestamps be saved in the body of the slice tiddler itself.

  3. Can an edit and save button be added to right side of the text box so that we get a visual feedback

    • when we want to edit the text (edit button )
    • when we want be sure that typed text is being saved (save button )
  4. Another button near the slice tiddlers is desirable so that we can open that slicetiddler in the story river

buggyj commented 2 years ago

Answers to:

These are my few suggestions

  1. The box next to the yt-end button shall be used to enter the title of the slice tiddler (which is by default parent tiddler name/slice) and it shall be edited manuallly. Currently the text typed in this box is being saved in the summaryfield of the slice tiddler.

I expect that the summary of a slice will often be 'main argument' or 'rebuttal' etc - as tiddlers must have unique titles this would cause problems, i.e. there can only one tiddler called 'rebuttal'.

  1. Can the extra tiddler be avoided and the text typed in the newly added text box below the timestamps be saved in the body of the slice tiddler itself.

    Each slice is a media tiddler and by convention use the _cannonical_uri format for external sources. This means the text(body) field cannot be used in these tiddlers

  2. Can an edit and save button be added to right side of the text box so that we get a visual feedback
    • when we want to edit the text (edit button )
    • when we want be sure that typed text is being saved (save button )

Editing a tiddler in this manner within another tiddler is difficult to do in vanilla tiddlywiki (may be you could ask about this in the forum)

  1. Another button near the slice tiddlers is desirable so that we can open that slicetiddler in the story river

    this is possible

buggyj commented 2 years ago

Answer to 4.

to the end of tiddler $:/bj/templates/isEditYTNextra add

{{||$:/core/ui/Buttons/edit}}

arunnbabu81 commented 2 years ago

Answer to 4.

to the end of tiddler $:/bj/templates/isEditYTNextra add

{{||$:/core/ui/Buttons/edit}}

Should i add {{||$:/core/ui/Buttons/edit}} to $:/bj/templates/isEditYTNextra or $:/bj/templates/isEditYTN.

image

The button is seen when i add {{||$:/core/ui/Buttons/edit}} to $:/bj/templates/isEditYTN only

arunnbabu81 commented 2 years ago

image

Why does the youtube video doesn't play in the slice tiddler

buggyj commented 2 years ago

if you edit the tiddler Chill Summer........|Daloka you will see the template that it is using - you may need to update to include the exta.

youtube video does not play in the slice tiddler because tiddlywiki does not support youtube videos directly. I have not added support for playing youtube videos in the 'story' - it is not something I would use.

buggyj commented 2 years ago

You can try this:

parsers_utubeparser.js.json.zip

arunnbabu81 commented 2 years ago

if you edit the tiddler Chill Summer........|Daloka you will see the template that it is using - you may need to update to include the exta.

I didn't understand it fully

arunnbabu81 commented 2 years ago

You should share the mediaplayer in the talk tiddlywiki forum so that other also can use it.

buggyj commented 2 years ago

Actually the template $:/bj/templates/playListYTNotationsExtra is calling $:/bj/templates/isEditYTN this is an error I will have to fix.

The mediaplayer is still not stable, I may still have to make some changes - maybe changing the web address that is used in the _canonical_uri from the actual web address of youtube to what youtube uses in the iframe.