CodingEmbedding YouTube

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  ANT_THOMAS  
 To:  ALL
39725.1 
What's the best way to embed YouTube videos these days?

I'm currently using the "old embed code" but IE9 doesn't seem to like it. Or do I just not have Flash installed?

Rather not use the iframe.

Though Beehive uses the iframe version.
0/0
 Reply   Quote More 

 From:  ANT_THOMAS  
 To:  ANT_THOMAS     
39725.2 In reply to 39725.1 
I didn't have flash installed :$ (fail)
0/0
 Reply   Quote More 

 From:  Lucy (X3N0PH0N)  
 To:  ANT_THOMAS     
39725.3 In reply to 39725.2 
(hug)
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  ANT_THOMAS     
39725.4 In reply to 39725.2 
quote:
Rather not use the iframe.

Why the fuck not?

quote:
I didn't have flash installed

youtube.com/html5

Wasn't perfect last time I checked, but it's improving.
0/0
 Reply   Quote More 

 From:  Ken (SHIELDSIT)  
 To:  Lucy (X3N0PH0N)     
39725.5 In reply to 39725.3 
Is there a emote that would represent retardedness?


By reading my posts you agree to my terms of service.
0/0
 Reply   Quote More 

 From:  ANT_THOMAS  
 To:  Peter (BOUGHTONP)     
39725.6 In reply to 39725.4 

No sensible reason.

 

The iframe way looks no different and is less lines of code so I might use it.

0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  ANT_THOMAS     
39725.7 In reply to 39725.6 
It's exactly the situation when an iframe makes sense / is intended to be used.
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  Ken (SHIELDSIT)     
39725.8 In reply to 39725.5 
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  Ken (SHIELDSIT)     
39725.9 In reply to 39725.5 
Sorry, I had to! (hug)
0/0
 Reply   Quote More 

 From:  Ken (SHIELDSIT)  
 To:  Peter (BOUGHTONP)     
39725.10 In reply to 39725.9 
:-O


By reading my posts you agree to my terms of service.
0/0
 Reply   Quote More 

 From:  Lucy (X3N0PH0N)  
 To:  Peter (BOUGHTONP)     
39725.11 In reply to 39725.4 
S'pretty much perfect now. (html5 youtube, that is)
0/0
 Reply   Quote More 

 From:  ANT_THOMAS  
 To:  Peter (BOUGHTONP)     
39725.12 In reply to 39725.7 
And with there being far less code it is much easier to have that part linked to a database too.
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  ANT_THOMAS     
39725.13 In reply to 39725.12 
Yep.

Although I still say you probably want auto-discovery and a few minimal config files. :P
0/0
 Reply   Quote More 

 From:  ANT_THOMAS  
 To:  Peter (BOUGHTONP)     
39725.14 In reply to 39725.13 
Auto-discovery of Photos in a folder? (or are you talking about something else?)
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  ANT_THOMAS     
39725.15 In reply to 39725.14 
Yes, and videos in a channel/playlist, and whatever else info you're duplicating into a database.
0/0
 Reply   Quote More 

 From:  ANT_THOMAS  
 To:  Peter (BOUGHTONP)     
39725.16 In reply to 39725.15 

So how would you do the photo part of it?

 

Let's say I have 6 folders of photos (living on a different server). How would you go about displaying them with thumbnails (thumbs will live on the other server too)? With a similar outcome to what I already have.

0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  ANT_THOMAS     
39725.17 In reply to 39725.16 
I don't remember the details of the outcome you currently have, but it's all pretty simple.

Every X minutes and/or when executing a particular script, do a directory listing for the parent directory of those six folders, and cache the results in a local text file (or if they are separate galleries do one file per folder).

Directory listing can be over HTTP or FTP or REST API or whatever - specifics of that will depend on what server supports and how easy PHP can do the appropriate things. (Search for if PHP can do virtual filesystems, if not, look at the appropriate FTP/file related functions.)

Then to output the files you just split it per line, like you already did before. Thumbnails can either be in a sub-directory with same filename, or be named filename.thumb.jpg, so you only need to do the listing once, and just output the a/href differently to the img/src.

No MySQL necessary.
0/0
 Reply   Quote More 

Reply to All    
 

1–17

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats