Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Done] Allow html inside marker tip #87

Open
m1ch0pv opened this issue May 1, 2018 · 5 comments
Open

[Done] Allow html inside marker tip #87

m1ch0pv opened this issue May 1, 2018 · 5 comments

Comments

@m1ch0pv
Copy link

m1ch0pv commented May 1, 2018

Hi,

In case it's helpful for anyone else, I made some changes to allow html inside the marker tip. Changes are here: https://github.com/m1ch3lp3r3z/videojs-offset/commits/master

Happy to make a PR if you think it'll be useful.

Thanks

@spchuang
Copy link
Owner

It seems helpful. Do you want to make a PR?

@nicolasroger17
Copy link
Contributor

I also think it's useful, I've made a PR just for this:
https://github.com/spchuang/videojs-markers/pull/94/files

@daveythomas
Copy link

How is this used/coded when setting up the marker tip? Is it possible to put an image in the html for the marker tip?

@nicolasroger17
Copy link
Contributor

It's been a while, but looking at the code, I believe you can do that:

   markerTip:{
      html: function(marker) {
         return '<img src="[url]" />';
      }
   }

@daveythomas
Copy link

daveythomas commented Jan 28, 2020

I am using HTML in the marker tips to show both an image and text as a way to let users know there is additional information available at certain points in the video.

Is it possible to add an <a href> link in the marker tip HTML to open a page or run a javascript? This would be especially useful on the iPad (or other mobile devices) where the first tap on a marker displays the marker tip and a natural second tap would be on the information that popped up in the marker tip.

Or is there another method that could be used to make each marker tip clickable? 

Currently, when clicking (or tapping) on the marker tip, it behaves like an extension of the timeline. If I click anywhere on an open marker tip it acts like I am clicking on the timeline and moves the playhead to that position/time on the timeline.  I'd like to be able to interact with the image or text as links within the HTML of the marker tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants