The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Persistent Music Throughout Forum (Not Seamless Player)

2 posters

Go down

In progress Persistent Music Throughout Forum (Not Seamless Player)

Post by Dr.Intern January 7th 2014, 4:25 am

My original post here: https://help.forumotion.com/t128409-persistent-music-throughout-forum?nid=8#859733
Inserted a copy of the message anyway. So my problem is that I went to implement the solution, which was to implement Seamless Music Player. But after I implemented it, I found that it conflicts with my Avacweb Chatbox. This is a major problem, so I switched back to the lame player I coded myself. I'm not to knowledgeable in javascript, but I have a feeling that my basic music player could be made into a javascript component that could be throughout the forum. My current method involves placing my entire forum into an iframe and have the html element float on top. This is quite bothersome, because if you refresh a page it refreshes the page the iframe is in and therefore you lose what ever you actually wanted to refresh.

But, if there is another seamless music player that doesn't conflict with my chatbox, that would be just as good. Thanks

Dr.Intern wrote:Link to forum: [url=chaoticbackup.forumotion.com]chaoticbackup.forumotion.com[/url]

To get persistent music throughout the forum, I embedded it into an iframe. I want the users to have the ability to pause and play the music so I added javascript to do so.  When I tested it through w3's try it editor, it works fine, but when I implemented the code into the site I - after I press the button and the song (video) starts, I cannot press the pause button.

Here is the page's html:
CODE: ----------SELECT CONTENT
Code:
<head>
<link rel="shortcut icon" type="image/x-icon" href="http://r20.imgfast.net/users/2016/18/35/72/smiles/2877754569.png">

<!-- script for music -->
<script>
function toggleVideo(state) {
    // if state == 'hide', hide. Else: show video
    var div = document.getElementById("popupVid");
    var iframe = div.getElementsByTagName("iframe")[0].contentWindow;
    div.style.display = state == 'hide' ? 'none' : '';
    func = state == 'hide' ? 'pauseVideo' : 'playVideo';
    iframe.postMessage('{"event":"command","func":"' + func + '","args":""}', '*');
}
</script>
<style type="text/css">
   html, body, div, iframe { margin:0; padding:0; }
   iframe { position:fixed; display:block; width:100%; border:none; }
</style>
</head>
<body>
<!-- Embed Forum -->
<iframe src="http://chaoticbackup.forumotion.com/forum" width="100%" height="100%">Your browser is incompatible. Please visit <a href="chaoticbackup.forumotion.com/forum">here</a> for a compatible site.<a href="http://chaoticbackup.forumotion.com/forum">a compatible version.</a></iframe>

<!-- Music Button-->
<div style="position:relative;z-index:200;float:right;padding-right: 40px;">
<a href="javascript:;" onClick="toggleVideo();">Music</a>

<!--play linked music -->
<div id="popupVid" style="position:absolute;display:none;">
   <iframe width="1" height="1" src="http://www.youtube.com/embed/9KAWo_lqpuY?enablejsapi=1&loop=1" frameborder="0" style="visibility:hidden;display:inline;"></iframe>
   <a href="javascript:;" onClick="toggleVideo('hide');">Pause</a></div>
</div>
<a href="http://www.forumotion.com" target="_blank" style="display:none">forumotion.com</a>
</body>

Additional Request:
It would be nice if pausing/playing the music button could be done with a single image (or changing between pause/play images) instead of two words.
avatar
Dr.Intern
Forumember

Posts : 77
Reputation : 3
Language : English

View user profile

Back to top Go down

In progress Re: Persistent Music Throughout Forum (Not Seamless Player)

Post by Dr.Intern January 10th 2014, 3:33 am

bump
avatar
Dr.Intern
Forumember

Posts : 77
Reputation : 3
Language : English

View user profile

Back to top Go down

In progress Re: Persistent Music Throughout Forum (Not Seamless Player)

Post by Dr.Intern January 14th 2014, 3:22 am

bump
avatar
Dr.Intern
Forumember

Posts : 77
Reputation : 3
Language : English

View user profile

Back to top Go down

In progress Re: Persistent Music Throughout Forum (Not Seamless Player)

Post by SLGray January 14th 2014, 5:04 am



Persistent Music Throughout Forum (Not Seamless Player) Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 50338
Reputation : 3473
Language : English
Location : United States

View user profile https://forumsclub.com/gc/128-link-directory/

Back to top Go down

In progress Re: Persistent Music Throughout Forum (Not Seamless Player)

Post by Dr.Intern January 14th 2014, 5:24 am

Sorry, the first isn't much of a help. It wouldn't be persistent, and my source aren't mp3 files.
The mixpod says its not available Sad
avatar
Dr.Intern
Forumember

Posts : 77
Reputation : 3
Language : English

View user profile

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum