Like SystemiConnectFri 15 Oct 2021, 04:50
Auto Save MessagesLGforumFri 26 Feb 2021, 13:31
New tutorial questionTheCrowMon 15 Feb 2021, 08:12
Support iOS Emojis (and other platforms)LGforumSun 14 Feb 2021, 01:25
LGforum (2806)
YouTube in chat Vote_lcapYouTube in chat Voting_barYouTube in chat Vote_rcap 
Mr.Easybb (1587)
YouTube in chat Vote_lcapYouTube in chat Voting_barYouTube in chat Vote_rcap 
Bloodbath (745)
YouTube in chat Vote_lcapYouTube in chat Voting_barYouTube in chat Vote_rcap 
Rukiafan (533)
YouTube in chat Vote_lcapYouTube in chat Voting_barYouTube in chat Vote_rcap 
Dom (513)
YouTube in chat Vote_lcapYouTube in chat Voting_barYouTube in chat Vote_rcap 
puppycheese (446)
YouTube in chat Vote_lcapYouTube in chat Voting_barYouTube in chat Vote_rcap 
pedro (330)
YouTube in chat Vote_lcapYouTube in chat Voting_barYouTube in chat Vote_rcap 
Neymar (301)
YouTube in chat Vote_lcapYouTube in chat Voting_barYouTube in chat Vote_rcap 
Hitsu (281)
YouTube in chat Vote_lcapYouTube in chat Voting_barYouTube in chat Vote_rcap 
Flora (275)
YouTube in chat Vote_lcapYouTube in chat Voting_barYouTube in chat Vote_rcap 


YouTube in chat

avatarGuest
Mon 30 Dec 2013, 09:09
Hi all!

I've got a question. Whenever someone's posting out a YT (YouTube) vid in chat, it gets to a halt when someone posts a new line in chat. How to keep the yt vid playing without any interruption?

Ty for ur comments, and Happy New Year to all of you!

Samantha.
Mr.EasybbMr.Easybb
Status : Love this site, that's why I'm back each day again... lol Samantha's co-owner now. Well deserved!

Posts : 1587
Join date : 2013-01-04
Mon 30 Dec 2013, 16:33
You can try this code out, it's not the best but without the youtube API accessible in this method we can't tell if the user is actually watching the video...

add this after the AWC code
Code:
[panda=js]avacweb_chat_config.message_hook.push(function(row, username, user_id, user, msg) { 
  var video = msg.children;
  var regex= /embed|object/i;
  for(var i =0; i<video.length;i++){
    if(video[i].nodeType !== 1) continue;
    if(regex.test(video[i].tagName)){
    avacweb_chat.toggle_setting('reading');
    cancelReading();
    }
  }
  function cancelReading(){
      avacweb_chat.id('chatbox').addEventListener('scroll', toggleSetting ,false);
  }
  function toggleSetting(){
  avacweb_chat.toggle_setting('reading');
  avacweb_chat.id('chatbox').removeEventListener('scroll', toggleSetting,false);
  }
});
avatarGuest
Sun 05 Jan 2014, 07:48
Thank you. Since we got back from a mini vacation to Brussels and Paris now, I'll try it the next days and let you know! Very Happy
avatarGuest
Thu 09 Jan 2014, 21:22
Thank you. Since we got back from a mini vacation to Brussels and Paris now, I'll try it the next days and let you know! Very Happy

EDIT 01-09-2014: I tested it with a test account, but it didn't work. Any more ideas?
Mr.EasybbMr.Easybb
Status : Love this site, that's why I'm back each day again... lol Samantha's co-owner now. Well deserved!

Posts : 1587
Join date : 2013-01-04
Thu 09 Jan 2014, 22:09
That is strange as I had this code added to mine and it worked perfectly fine. Check you console for errors
avatarGuest
Fri 10 Jan 2014, 22:24
I'm testing with 1 user logged on using FireFox, and the other one using IE8. Doesn't matter who's sharing a yt video in chat, whenever someone writes another notification, the yt vid stops playing and the player is reset to 0.

Now, I'm not used to this console checker. What should I be looking for? It's way to technical to me what I'm seeing.

Here's what it says in IE8:
LOG: Invalid Avacweb Chat message hook: TypeError: Deze eigenschap of methode wordt niet ondersteund door dit objectfunction(row,username,user_id,user,msg){var video=msg.children;var regex=/embed|object/i;for(var i=0;i<video.length;i++){if(video[i].nodeType!==1)continue;if(regex.test(video[i].tagName)){avacweb_chat.toggle_setting('reading');cancelReading()}}function cancelReading(){avacweb_chat.id('chatbox').addEventListener('scroll',toggleSetting,false)}function toggleSetting(){avacweb_chat.toggle_setting('reading');avacweb_chat.id('chatbox').removeEventListener('scroll',toggleSetting,false)}}

And I'm not sure what to look for in FireFox.
Mr.EasybbMr.Easybb
Status : Love this site, that's why I'm back each day again... lol Samantha's co-owner now. Well deserved!

Posts : 1587
Join date : 2013-01-04
Sat 11 Jan 2014, 02:43
well looks like its an invalid message hook. let me see whats going on I suppose.
avatarGuest
Sun 12 Jan 2014, 00:13
Supposably... What should I do next?

Ch@lo ValdezCh@lo Valdez
Status : :)

Posts : 218
Join date : 2013-04-21
Age : 48
Location : Mexico City
Fri 16 May 2014, 03:14
it's posible fix this plugin?
avatarGuest
Fri 16 Jan 2015, 04:06
Bump. I really need this fixed. It's showing nada at the moment, just a good big gap between the lines.

This is the code I'm using:
Code:
[panda=js]//**** PLUGIN YTVIDS ****//
avacweb_chat_config.message_hook.push(function(row, username, user_id, user, msg) { 
  var video = msg.children;
  var regex= /embed|object/i;
  for(var i =0; i<video.length;i++){
    if(video[i].nodeType !== 1) continue;
    if(regex.test(video[i].tagName)){
    avacweb_chat.toggle_setting('reading');
    cancelReading();
    }
  }
  function cancelReading(){
      avacweb_chat.id('chatbox').addEventListener('scroll', toggleSetting ,false);
  }
  function toggleSetting(){
  avacweb_chat.toggle_setting('reading');
  avacweb_chat.id('chatbox').removeEventListener('scroll', toggleSetting,false);
  }
});
//**** END PLUGIN YTVIDS ****//

To me, being able to play YT videos in chat, will be one of the key elements on my board, so it's a very important feature! Like last year on my other website, people will want to share their latest YT let's play gaming videos with other members and share music videos while at it to be able to share interests and bond members.

If possible, I'd like the YT video to be shown without using BB-code, so when someone drops a YT link in chat, it should play the video straight away and continue to play (if the play button was hit) while other members and the member watching it are chatting.

I understand I'm throwing a lot at everyone's feet lately, but I have a very creative mind at work, while you're the clever ones working them out, translating that into stuff I'm able to use and others can profit from as well. Credit and Respect to those technicians working on them and many thanks to you! Smile

My website: http://www.friendcodes.nl
Version: phpBB3
I'm forwarding traffic from http://www.friendcodes.nl to http://fcnl.actieforum.com. I'm using AWC in a single and separate HTML page, members only, so PM me if you need an admin account (Avacweb Staff only, _Twisted_Mods_ got an account already) ( http://fcnl.actieforum.com/h1-friendcodes-chatbox ).

Love,

Samantha.
LGforumLGforum
Status : Working to restore AWC!

Posts : 2806
Join date : 2011-10-05
Age : 30
Location : UK
Mon 19 Jan 2015, 00:15
I believe Easybb wrote the original hook to make this work so it will have to be him again.
However the next version of AWC may potentially see the end of the hook functions so a different method will have to be devised. Maybe the new share-box feature yet to be released can be extended to allow YouTube videos.
avatarGuest
Mon 19 Jan 2015, 00:30
@Mr.Easybb : Could you please write me an update on the script I'm using? It doesn't work and since LG is working on another AWC version for which is uncertain if the hook functions will still be there and it's uncertain when this release will be definite, meanwhile I'd really like this to work. Thanks in advance,

Samantha.

EDIT: Just been told by LG he hopes to have a new version of AWC ready in a week to 2 maybe.
avatarGuest
Thu 23 Apr 2015, 16:35
This has been on hold for some time now because of the latest AWC release, but with this post I'm trying to get the request revived in some way. Several replies have been written on this in various topics and the latest on it was that because it was using a hook in AWC, the functionality has been dropped. @LGforum , could you please be so kind to re-write this using an event or recreate the plug-in, so that yt videos will be kept playing in AWC whenever someone shares a video? FYI, I've found something you might be interested in regarding this request: http://www.htmlgoodies.com/beyond/video/respond-to-embedded-youtube-video-events.html , but I'm not quite sure if it would be of any help to anyone.

Thanks in advance.

Samantha
BloodbathBloodbath
Status : No status yet...

Posts : 745
Join date : 2013-05-31
Age : 28
Thu 23 Apr 2015, 17:19
I can check this out soon. It should be fairly achievable.
avatarGuest
Thu 23 Apr 2015, 17:20
Thanks, BB. This isn't very urgent atm, but it'd be a nice to have.... well a must have for my forum so to speak, but since it's been out of order for a while now, I can wait a bit longer. How are your exams coming along?
BloodbathBloodbath
Status : No status yet...

Posts : 745
Join date : 2013-05-31
Age : 28
Thu 23 Apr 2015, 17:22
Samantha wrote:[quotelink="http://www.avacweb.com/t1838-youtube-in-chat#23040"]Thanks, BB. This isn't very urgent atm, but it'd be a nice to have.... well a must have for my forum so to speak, but since it's been out of order for a while now, I can wait a bit longer. How are your exams coming along?

I'll add it to my to-do-list anyway. Just finished my first exam today, two more to come, in less than two weeks I'll be done almost completely, last exam is oral and takes place in June.
avatarGuest
Thu 23 Apr 2015, 17:24
Bloodbath wrote:[quotelink="http://www.avacweb.com/t1838p15-youtube-in-chat#23041"]
Samantha wrote:[quotelink="http://www.avacweb.com/t1838-youtube-in-chat#23040"]Thanks, BB. This isn't very urgent atm, but it'd be a nice to have.... well a must have for my forum so to speak, but since it's been out of order for a while now, I can wait a bit longer. How are your exams coming along?

I'll add it to my to-do-list anyway. Just finished my first exam today, two more to come, in less than two weeks I'll be done almost completely, last exam is oral and takes place in June.

Well, best of luck to you then! Hope you'll pass! And thanks in advance for putting it on your list. Wink
Sponsored content