YouTube fieldtype only outputs the video URL
Hi Guys,
I have jsut tried using the new YouTube fieldtype and having followed my docs, my template looks like this;
<div class="video">
<perch:content id="video" type="youtube" label="YouTube URL" output="embed" width="400" height="200" />
<perch:content id="video" type="youtube" label="YouTube URL" output="title" />
<perch:content id="video" type="youtube" label="YouTube URL" output="description" />
<perch:content id="video" type="youtube" label="YouTube URL" output="date" />
</div>
I am just playing to see what I can do. But after the initial embed works and outputs the video. None of the other outputs seem to work, instead each one just outputs the URL of the video (e.g https://www.youtube.com/watch?v=umIAsqqk8L8)
Also I noticed if you only specify a width then the video also doesn't show, it needs both width and height, but not sure how this will work if the videos from YouTube are different aspect rations as this could squeeze or stretch. I would expect a width only to keep the height aspect ration, like with images.
Any ideas on both these points?
Thanks, Terry
Hi Terry
Regarding the video size try removing your width and height settings from the video and add this style to your stylesheet should work (you can customise margins etc as needed).
Is
output="player"
any better?I tried this as I saw it from another thread. But to didn't seem to work either? I didn't even get the video with this option, it just retuned the URL again.
Neil - thanks for this. I will give this a test too.
Are you on a Windows server?
Nope. On Mac (OSX) but also tried it on live server (Linux/Centos)
Is the video a public one?
Yes it is. It is this one. https://www.youtube.com/watch?v=umIAsqqk8L8
Hmm, ok. This is the second similar report I've had, but as yet I can't reproduce the issue.
If you want access to the draft site on the server then let me know. If it helps to see anything?
I had a similar issues, but with only one specific video. It turned out that it contained copyright-protected content. The specific error message was: "This video contains content from SME. It is restricted from playback on certain sites."
Terry, does your video contain copyright-protected content?
There is no copyrighted content I am aware of (it is a clients video). But I have tried with a few videos and the same issue occurs. Even videos from other YouTube users.
I'll keep trying to reproduce it, but I'm a bit at a loss until that point.
I'm having the same problem - running EasyPHP on Windows. Yet to test on live server.
All I get it the youtube URL when I try to use other output options.
I'm having same problem on live site... Any updates?
Hi Guys,
Any updates on this at all?
Thanks
No, it's not something we can reproduce.
What is the likely cause of this not working so I can see if I can add something to make it work? Sometimes missing in server setup/php?
I had to just resort to a custom/manual solution. Far from ideal but not having the thumbnail load was an unacceptable solution for the client :(
If you can give me enough information to reproduce it, I can try again.
Happy to liaise Drew. What details or information do you want or would help? Not doing anything different except using it as per the docs - so thinking possible something server-side missing or required? Would a PHP info file be of any use?