derekn
Janvier 20, 2020, 5:13
1
Hi guys,
Newbie here.
Was wondering if there was a way to a an html snippet to each page. I come from a wordpress back ground so am not too familiar with how it works here.
Any advice appreciated.
Regards
Derek
Hi,
You can try using some JavaScript but it would be a little bit hacky. PeerTube is not a CMS like Wordpress
miroR
Février 7, 2020, 3:14
3
I have been trying to figure out this whole morning how to insert/embed HTML code in pages.
It looks to me PeerTube developers have yet to consider this need.
=-=-=-=-=
And I went on… But I was wrong. So I’m deleting the useless part of this post. Sorry!
miroR
Février 7, 2020, 3:25
4
I’m sorry I rushed with my post just above.
I found something:
There doesn’t seem to be any way to embed a video player on a thirdparty website. This makes it problematic to take advantage of the platform from within other content such as blogposts.
One feature I particularly care about is the ability to control the player from the embedding page. For easy interoperability with existing legacy code, I suggest following the youtube player api . The function names are sensible enough and offer all the functionality you could need.
Hello, I have a forum on which youtube/dailymotion links display an embed code that allow users to watch the video without leaving the page.
I have issues embedding peertube cause it’s not a common format.
Let’s say I have that js code:
embed.getSrcFramatube = function(url) {
if (!url.includes("/videos/"))
return;
var videoId = url.split("/")[4];
if (!videoId)
return;
return "https://framatube.org/videos/embed/" + videoId;
};
It doesn’t work with https://framatube.or…
how do i customize the peertube player because i want to embed videos in my website and would like to to make changes to the player
And here is where, at a quick glance, some things are happening:
ouvert 04:23PM - 10 Jul 18 UTC
fermé 02:06PM - 11 Jun 19 UTC
Priority: Low
Type: Feature Request
Component: Player
Component: Embed
Here are some possible options that can be useful for an advanced use of the emb… ed video player. Those are proposals and I am curious about your thoughts. Let me know!
Title | [Sass class name](https://codepen.io/heff/pen/EarCt) | Description | Default value
------------ | -------------| -------------| -------------|
Width | none | Value in px. Width of the player | `560`
Height | none | Value in px. Height of the player | `315`
Title | none | Boolean, display or not the video title | `true`
Subtitle | none | Boolean, display or not the video subtitle | `true`
Bar icons | none | `full` `minimal` or `none`, 3 levels of icons displayed on the bottom bar: `full`: Play, Time, Volume, Settings, PeerTube logo, Fullscreen. `minimal`: Play, Volume, Fullscreen. `none`: no icons. | `full`
Background color | primary-background-color | Changes the play button and the bottom bar background color | A linear gradient
Foreground color | primary-foreground-color | Changes the play button and the bottom bar icons color | `#ffffff`
Peertube button | none | Boolean, display or not the peertube button in control bar | `true`
Also some questions I have in mind:
- What is the current player skin based on?
- What led to the design choices?
- Can instance admin change the player CSS skin, if yes how easily?
I’ll study all those links I gave above.
miroR
Février 7, 2020, 5:44
5
Embed/insert HTML code in your pages can be done with PeerTube.
See also:
The ability to control the embedded player from the hosting page.
The youtube player api is a good example to follow, keeping...
Component: Embed
Component: Player :play_or_pause_button:
which points to relatively recent changes.
For hosters there is:
https://docs.joinpeertube.org/#/api-embed-player
It is workable and this means decentralization is more and more achievable.