Advertisement:

Author Topic: Simple Audio Video Embedder  (Read 898842 times)

Offline SulevFan

  • Charter Member
  • Jr. Member
  • *
  • Posts: 163
Re: Simple Audio Video Embedder
« Reply #3360 on: December 18, 2020, 11:24:29 AM »
Need a little help/clarification please?

I've installed the mod and links you YouTube works flawlessly (awesome!).

What I also need is to allow folks to upload .mp4 files created by a game, and then somehow link to that upload and create the player window.

I tried linking the the file in the format that it is shown as an attachment, but that did not work. Any advice on how to go about this?

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,394
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Simple Audio Video Embedder
« Reply #3361 on: December 18, 2020, 01:37:26 PM »
We do not autolink attachments.

If they put a full link that ends in .mp4 we have setting to embed those I believe.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline SulevFan

  • Charter Member
  • Jr. Member
  • *
  • Posts: 163
Re: Simple Audio Video Embedder
« Reply #3362 on: December 18, 2020, 05:44:41 PM »
We do not autolink attachments.

If they put a full link that ends in .mp4 we have setting to embed those I believe.

I think I figured it out.

If we have .mp4 files "somewhere" on our site, the mod can autolink to those.  This is essentially what you said in your response, I think.

What we were kind-of thinking was to have folks upload very specific, small video  files  (made by in-game software, so we have some degree of control over their size and content) to our site, and then link them from the forum.

But that doesn't seem like it's going to fly, so folks will now have to upload to YouTube and then just manually link to it.  Less than perfect, but that is how life is.

Thanks for your input.

Offline billtidy

  • Newbie
  • *
  • Posts: 4
Re: Simple Audio Video Embedder
« Reply #3363 on: December 28, 2020, 05:23:20 AM »
Thank you for this mod

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,394
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Simple Audio Video Embedder
« Reply #3364 on: January 04, 2021, 09:26:13 PM »
Major new update!

6.0
+Added a setting to show the original link after the embed is added.
+Added a setting to set the maximum number of emdeds to display per page load.
+Redid the entire replacement function with a callback. Allowed more control for the new setting features added and provides a better way to count number of embeds loaded.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Online alexetgus

  • Sr. Member
  • ****
  • Posts: 755
  • Gender: Male
    • alexetgus on Facebook
    • alexetgus on GitHub
    • @alexetgus on Twitter
    • Chez oim, forum libre !
Re: Simple Audio Video Embedder
« Reply #3365 on: January 05, 2021, 07:28:36 AM »
Hi,

Attached is the French translation UTF-8.
UNIX line breaks. (\n)



Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,394
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Simple Audio Video Embedder
« Reply #3366 on: January 05, 2021, 11:39:06 AM »
Hi,

Attached is the French translation UTF-8.
UNIX line breaks. (\n)



Added translation to the package. thanks
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline GigaWatt

  • The Smiley Guy
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,341
  • Gender: Male
    • MechDR on GitHub
    • Macedonian electronics forum
Re: Simple Audio Video Embedder
« Reply #3367 on: January 05, 2021, 11:44:26 AM »
I'm curious, does the mod automatically detect links and embeds the video/audio or does it work with tags... or both?
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,394
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Simple Audio Video Embedder
« Reply #3368 on: January 05, 2021, 12:08:56 PM »
It auto changes links to emebed code  if it is a supported site.  Does not use any bbc tags.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline GigaWatt

  • The Smiley Guy
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,341
  • Gender: Male
    • MechDR on GitHub
    • Macedonian electronics forum
Re: Simple Audio Video Embedder
« Reply #3369 on: January 05, 2021, 01:32:10 PM »
Mhm... so, what happens if it encounters the youtube tag from the Yet Another YouTube BBCode Tag mod... because that mod works with and without tags.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,394
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Simple Audio Video Embedder
« Reply #3370 on: January 05, 2021, 02:12:11 PM »
It only populates if it is a hyperlink. If it is not a link then it won't parse it.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline GigaWatt

  • The Smiley Guy
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,341
  • Gender: Male
    • MechDR on GitHub
    • Macedonian electronics forum
Re: Simple Audio Video Embedder
« Reply #3371 on: January 05, 2021, 10:43:55 PM »
Aha, thanks for the info ;).
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Offline tjbalon

  • Jr. Member
  • **
  • Posts: 124
Re: Simple Audio Video Embedder
« Reply #3372 on: January 15, 2021, 04:34:17 AM »
Support for twitch clips

Code: [Select]
INSERT INTO `smf_mediapro_sites` (`id`, `title`, `enabled`, `website`, `regexmatch`, `embedcode`, `processregex`, `height`, `width`) VALUES
(124, 'Twitch Clips', 1, 'https://twitch.tv/', 'https://clips.twitch.tv/([A-Za-z0-9]*)', '<iframe src="https://clips.twitch.tv/embed?clip=$1&parent=#parent#" frameborder="0" allowfullscreen="true" scrolling="no" height="378" width="620"></iframe>', NULL, 378, 620);

Support for github gist

Code: [Select]
INSERT INTO `smf_mediapro_sites` (`id`, `title`, `enabled`, `website`, `regexmatch`, `embedcode`, `processregex`, `height`, `width`) VALUES
(125, 'GitHub Gist', 1, 'https://github.com', 'https?://gist.github.com/([A-Za-z0-9\\-]*\\/[A-Za-z0-9]*)', '<script src="https://gist.github.com/$1.js"></script>', NULL, 300, 700);
« Last Edit: January 15, 2021, 04:58:05 AM by tjbalon »

Offline tjbalon

  • Jr. Member
  • **
  • Posts: 124
Re: Simple Audio Video Embedder
« Reply #3373 on: January 15, 2021, 09:33:48 AM »
Cannot edit last post.

Anyway to allow a user to post a link without it auto embedding? It is messing with [url] tags for example. Would be great to be able to like [noembed]LINK[/noembed] for protection for example.

Also, here is an updated spotify entry (now supports artist, track, playlists, and albums):
Code: [Select]
(11, 'Spotify', 1, 'https://spotify.com', 'https?:\\/\\/open.spotify.com\\/([A-Za-z0-9]*)\\/([A-Za-z0-9]*)(\\?)?([A-Za-z0-9\\=\\_\\-]*)', '<iframe src="https://open.spotify.com/embed/$1/$2" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>', NULL, 80, 250),

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,394
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Simple Audio Video Embedder
« Reply #3374 on: January 15, 2021, 08:56:36 PM »
I think if you do nobbc code from SMF it might stop it from being embeded.
Thanks for the embeds will get them added.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,394
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Simple Audio Video Embedder
« Reply #3375 on: January 15, 2021, 09:51:05 PM »
Update:
6.0.1
+Added support for Reddit posts
+Added support for twitch clips thanks to  tjbalon
+Added support for github gists thanks to  tjbalon
+Updated spotify entry (now supports artist, track, playlists, and albums) hanks to tjbalon
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline tjbalon

  • Jr. Member
  • **
  • Posts: 124
Re: Simple Audio Video Embedder
« Reply #3376 on: January 15, 2021, 11:13:03 PM »
Could you point out where in the mod it actually does the processing? Is it in Display.template and Sources/Display? If I can find where it actually processes it, I can just modify to look for certain characters or tags like ! before, or something like that. I suspect nobbc will not work because it embeds in a [url=http://BLAHBLAH]text[/url], the url inside that tag would trigger the embed. Tested today.

I had tried to alter all the regexmatch rows for tags before and after, manually doing it, but it too would auto embed and I've yet to find the logic where you actually search for the embeds. I will take another look later if you do not reply.

Here are a few more embeds we either updated or altered to ensure they work properly:
Code: [Select]
(5, 'Twitch Channels', 1, 'http://twitch.tv', 'https?://www.twitch.tv/([A-Za-z0-9]*)', '<div id="twitch-embed"></div><script src="https://player.twitch.tv/js/embed/v1.js"></script><script type="text/javascript">  new Twitch.Player("twitch-embed", {    channel: "$1", autoplay: false,  height: "378",    width: "620",    parent: "#parent#"  });</script>', NULL, 378, 620),
(6, 'Twitch Videos', 1, 'https://www.twitch.tv', 'https://go.twitch.tv/videos/([A-Za-z0-9]*)ZSPLITMZhttps://www.twitch.tv/videos/([A-Za-z0-9]*)', '<div id="twitch-embed"></div><script src="https://player.twitch.tv/js/embed/v1.js"></script><script type="text/javascript">  new Twitch.Player("twitch-embed", {    video: "$1",    height: "378",    width: "620",    autoplay: false,    parent: "#parent#"  });</script>', NULL, 378, 620),
(7, 'Twitch Clips', 1, 'https://twitch.tv/', 'https?://clips.twitch.tv/([A-Za-z0-9]*)', '<iframe src="https://clips.twitch.tv/embed?clip=$1&parent=#parent#" frameborder="0" allowfullscreen="true" scrolling="no" height="378" width="620"></iframe>', NULL, 378, 620),

(Believe the VOD logic had a small error, now fixed.)


Edit: NoBBC works, but it would be nice to look where that is still and hopefully solve [url], as if you want to link something as of right now it will auto embed and mess up the url tags.

Thanks :)

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,394
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Simple Audio Video Embedder
« Reply #3377 on: January 15, 2021, 11:18:38 PM »
The mod does it's work in Sources/AutoEmbedMedia2.php in function MediaProProcess($message)
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,394
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Simple Audio Video Embedder
« Reply #3378 on: January 22, 2021, 07:07:53 PM »
Update
6.0.2
+Added support MSNBC videos
+Added support NBC News videos
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline Cardi

  • Newbie
  • *
  • Posts: 2
Re: Simple Audio Video Embedder
« Reply #3379 on: January 26, 2021, 03:43:08 AM »

Suppor for lbry.tv, odysee and gab, please, youtube and vimeo have censored and deleted many videos

hxxp:lbry.tv/ [nonactive]
hxxp:odysee.com [nonactive]
hxxp:gab.com [nonactive]

thank you!