The ticker plugin allows to display current local time and brand icon (bottom ticker), just like many TV broadcasters used to do.
When the RSS <link> element is defined for the news item, scrolling news title or news text becomes a link as well. When a non standard RSS <pubTime> element is defined, e.g., 16:24, it will precede the news title or text.
Code snippet
<link href="//domain.com/videojs/videojs.min.css" rel="stylesheet" type="text/css" /><link href="//domain.com/videojs/plugins/videojs.ticker.css" rel="stylesheet" type="text/css" /><script src="//domain.com/videojs/video.min.js"></script><script src="//domain.com/videojs/nuevo.min.js"></script><script src="//domain.com/videojs/plugins/videojs.ticker.js"></script>
<script>const player = videojs("my_player_id", license: "key");player.nuevo({ contextMenu:false });player.ticker({ rss:"/path-to-rss-news" });</script>
If RSS descriptions are missing for each news item, the plugin will scroll news titles only. If RSS titles are missing, the title block will be hidden, and the description items will scroll anyway.
Code snippet
<rss version="2.0"><item><title>News title here</title><description>News text here</description></item></rss>
Code snippet
<rss version="2.0"><item><title>News title here</title><description>News text here</description><pubTime>16:24</pubTime><link>News URL here</link></item></rss>
Code snippet
player.ticker{{ clock:false })
Code snippet
player.ticker{{ logo: "path-to-logo-icon.png", logourl: "path-to-go-on-logo-click" })
Code snippet
player.ticker{{ speed:2 })
Code snippet
player.ticker{{ position:"top" })
Code snippet
player.ticker{{ direction:"rtl" })
Code snippet
player.ticker{{ refresh: 20 })
On touch screen, scroll will pause when you touch the title block or scrolling text and start scrolling when you touch it again.
The plugin features two public functions to hide and show the ticker.
Code snippet
player.ticker.hide(); player.ticker.show();