embed youtube video in TYPO3 from youtube-nocookie.com - typo3

is there a possibilty to embed a youtube video in TYPO3 8.6 with expanded data protection? That means loading the video not via https://www.youtube.com/embed/.... but from https://www.youtube-nocookie.com/embed/ ...
I am able to load the youtube video in file module with this embed code:
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/<code>?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
But in the frontend the video is embedded with this code:
<iframe width="560" height="315" src="https://www.youtube.com/embed/<code>?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
Thanks!

Or add
additionalConfig="{no-cookie : '1'}"
so it looks like this:
<f:media file="{mediaElement}" width="{settings.detail.media.video.width}" additionalConfig="{no-cookie : '1'}" />
to the f:media element in FalMediaVideo.html.
Please be aware that if you dont have those native Typo3 Templates in your own Directory they will get overwritten by the next update ;)

You can simply wait for the next TYPO3 8.7 release which is planned for May 22nd. That release will automatically use the youtube-nocookie.com domain for Youtube video embeds. (Don't be confused by the version here, it's simply missing in the 8.7 branch)

Related

Can you embed a spotify song to a github README file?

I know this isn't really that important but I thought it would be fun if you could embed a spotify to your markdown.
I tried pasting this into the README.md-file but it didn't transform into a widget:
<iframe src="https://open.spotify.com/embed/track/1UgMLFmeVyphjePcN1TNpq" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>
Can somebody tell me if it's possible to embed this using markdown?
It's currently not possible to use iframes inside of your README on GitHub. This question has to do with the same underlying issue you're having. In short, iframes are not on the list of allowed HTML tags. You can see which tags are allowed here: https://github.com/github/markup/issues/245#issuecomment-357613929
You can just put this line of code in your README file:
[![Spotify](https://spotify-github-readme.vercel.app/api/spotify)](https://open.spotify.com/collection/tracks)
And it will display the Spotify songs in your README file

Why my amp site with amp-facebook-comments not show?

My website at: https://2top.xyz
My issues:
AMP Facebook Comment plugin not show
Test site: https://2top.xyz/dieu-khoan-cung-cap-va-su-dung-dich-vu-tai-website-2top.1574766128301
I read at: https://amp.dev/documentation/examples/components/amp-facebook-comments/?format=websites and my code is:
At header:
<script async custom-element="amp-facebook-comments" src="https://cdn.ampproject.org/v0/amp-facebook-comments-0.1.js"></script>
At my body post:
<amp-facebook-comments width="486"
height="657"
layout="responsive"
data-href="https://2top.xyz/dieu-khoan-cung-cap-va-su-dung-dich-vu-tai-website-2top.1574766128301">
</amp-facebook-comments>
I don't know why this plugin not show, please help me! Thanks!
Note: this is my custom site I build with golang, upcloud vps and cloudflare cdn!
I resolved this issues myself. Because I didn't define width of parent <div> which contains the <amp-facebook-comments> component. So my final code is:
<div class="comment" style="width:100%">
<amp-facebook-comments
width="480"
height="720"
layout="responsive"
data-href="https://2top.xyz/dieu-khoan-cung-cap-va-su-dung-dich-vu-tai-website-2top.1574766128301">
</amp-facebook-comments>
</div>
And it's working now!

How can I integrate Google Charts on AMP pages

I use Google Table Charts in my "normal" (NON-AMP) pages. But in the AMP pages they are not there. When I load my page without /AMP at the end I can see the tables and with /AMP at the end not.
Example:
https://lotto-6-aus-49.de/lottozahlen-von-heute-mittwoch-den-20-03-2019
and
https://lotto-6-aus-49.de/lottozahlen-von-heute-mittwoch-den-20-03-2019/amp
To get AMP pages on my site I use a wordpress plugin. I searched for adding "java scripts" in AMP site but cannot find.
Can someone help me?
First of all you need a template with your charts. Let's call that template.html
<amp-iframe width="200" height="100"
sandbox="allow-scripts allow-same-origin"
layout="responsive"
frameborder="0"
src="/template.html"></amp-iframe>
You can put all of your js into that template. The iFrame should work.
But please keep in mind that iFrames are only allowed when below 80% from the top of the page.
if you need to load dynamic content, you could create a php file which accepts parameters and returns a html file that does include the chart.
<amp-iframe width="200" height="100"
sandbox="allow-scripts allow-same-origin"
layout="responsive"
frameborder="0"
src="/charts.php?startDate=2019-01-01&endDate=2019-02-01"></amp-iframe>
Actually you can't.
You need JavaScript for that which doesn't work with AMP.
added:
iFrame Solution:
First you create a template (html + js) that does show the chart you want to display. Then you import that template file using amp-iframe.
<amp-iframe width="200" height="100"
sandbox="allow-scripts allow-same-origin"
layout="responsive"
frameborder="0"
src="pathtotemplate/template.html">
</amp-iframe>

How to switch off autoplay when displaying facebook wall (includes videos) on web-page

I am using the drupal module https://drupal.org/project/facebook_wall to pull a facebook wall onto my website. The wall contains facebook videos, and all of these start, so autoplay must be set to on by default.
Is there a way to pull the wall with autoplay switched off?
The module requests the facebook page using curl and the graph api:
$api_url = 'https://graph.facebook.com/' . FB_PAGE_NAME . '/posts?access_token=' . FB_ACCESS_TOKEN . '&limit=10'
Changing the url to this one doesn't change anything:
$api_url = 'https://graph.facebook.com/' . FB_PAGE_NAME . '/posts?access_token=' . FB_ACCESS_TOKEN . '&limit=10&autoplay=off'
The url of one of the videos is constructed like this:
<iframe scrolling="no" width="400" height="250" src="https://fbcdn-video-a.akamaihd.net/hvideo-ak-ash3/v/xxxxx_n.mp4?oh=yyy&oe=zzz&__gda__=aaa" frameborder="0"></iframe>
In the original version of the question, I had entered here the "embed" line that is displayed on the finished page. I then realized that it must have been embedded through the iframe tag, which is what the module pulls from facebook.
I changed the iframe tag to:
<iframe scrolling="no" width="400" height="250" src="https://fbcdn-video-a.akamaihd.net/hvideo-ak-ash3/v/xxxxx_n.mp4?autoplay=false&oh=yyy&oe=zzz&__gda__=aaa" frameborder="0"></iframe>
The good news is: the video doesn't start.
The bad news is: instead of the video, the following error message is displayed:
An error occurred while processing your request.
Reference #50.bcb754b8.1377899267.aa42993
Any idea what to possibly do to switch the player off?
You need to pass the argument
<embed width="100%" height="100%" name="plugin" src="https://fbcdn-video-a.akamaihd.net/hvideo-ak-ash3/v/xxxx_n.mp4?oh=yyy&oe=zzz&__gda__=aaa" type="video/mp4">
to
<embed width="100%" height="100%" name="plugin" src="https://fbcdn-video-a.akamaihd.net/hvideo-ak-ash3/v/xxxx_n.mp4?oh=yyy&oe=zzz&__gda__=aaa" type="video/mp4" autoplay="false">
to do this, I think maybe you can try the following code
$api_url = 'https://graph.facebook.com/' . FB_PAGE_NAME . '/posts?access_token=' . FB_ACCESS_TOKEN . '&autoplay=false';
Let me know if that way works.

Streaming Audio From Voscast Server

I am working on an app I would like to basically be a radio style app. I have a site set up that uses Voscast to play through content that I have set up. Are there any good tutorials for setting up an iPhone app that you can stream from your voscast site, and pull in metadata off of what is currently playing?
Its a little bit late, but you can do this using an html5 player by adding this to your HTML code:
<iframe width="150" scrolling="no" height="30" frameborder="0" src="http://cdn.voscast.com/player/player.php?host=[yourHostHere]&port=[yourPortHere]"></iframe>