I am working on a site for a client, and he specifically requested that we tie audio clips of this character speaking to images of said character so that when you click the image of the character, it plays one of his trademark phrases.
In addition to that, some of the images also need to contain a hyperlink, so when you click the image, it plays audio AND links you to another page.
I have been successful in linking the audio to the image, and adding a hyperlink to an image is nothing new, but I cannot for the life of me get them both to work at the same time!
Can anyone help me with this?
Someone else asked this question and was directed to http://jplayer.org/ which is an opensource player with various guides on how to implement it, including various integrated Javascript functions that, I imagine, can be used within an 'onclick' function..
-- The question: Play mp3 file with javascript onClick
Related
I will admit I'm very unfamiliar with html - I've only really worked with object-oriented programming and not markup languages.
I'm working on audio controls for a website for someone else, I feel like I understand how the control tag itself works, but I cannot make the urls I link or function in audio players. I think it's the because of how I'm uploading the files, but I don't know if a website directly uploads the files. (I've tried using dropbox/google drive, but I don't think I can get the link I would need for that.)
Because of requests from the employer I'm working through go-daddy's iframe and not creating from scratch if that is relevant.
The upper line is my attempt at writing audio controls, the second controls are just an example I've been trying to mimic.
Code in question
I am working a website, and I'm trying to prevent the video file to be downloadable.
I've already prevented the right click function, and I've used a webiste called http://htmlobfuscator.com/ that allows the source code to be very difficult to decipher. The only issue I now have remaining is the inspect element feature on browsers. Does anyone know of any way to prevent this? I know that someone is always going to find a way to download or capture a video, but I'm just trying to limit the spread of my videos.
Thanks for your help,
Stephen
There is no actually way of completely stopping someone, you could however as some have mentioned use something like Vimeo or YouTube to minimize the downloading of your videos, or another way you could do it and have found from personal experience is either creating a login/register on your site to make someone signup to get your video thus minimizing how many can download it or you can encrypt the video with a password, i believe Vimeo has this option which requires someone to enter a password in before even viewing the video.
Yet these are just two ways to Minimize not completely stop.
There is no way to stop a browser's document inspector from finding your file's location. However, I am a recording musician, and I know of a few things you can do to make thieving more difficult.
Put your JS video location in an external file. Not a lot of protection here, but worthwhile enough to add.
Break up the video location into a few different JS variables. Your thief would at least need some basic JavaScript knowledge to get to the video location.
Use an obfuscater, like you did. (I LOVE HTMLObfuscator!)
You could use flash video. This is difficult to download, but slower viewing, and also a bit more difficult to create and host on your website.
The best thing to use is streaming video, but not everyone is able to do that either.
Good luck!
I've been racking my brain and my search bar with what I thought was a simple question:
I'm trying to add an SWF file, hosted on the same server as the blog, into a blog post. I need it to autoplay and have controls. I'm also trying to avoid using the embed element, i've read it's wonky.
When using SWFobject Wordpress mangles the conditional comments, deletes parts of the code, adds the embed element, and sometimes changes the dimensions.
I've also tried using Wordpress Shortcode: it does nothing but hyperlink to the video. I'm thinking this is due to no oEmbed support though i'm not sure.
Is there a way to turn off Wordpress's Object/comment mangling? What is best practice for using Wordpress and embedding video?
In case anyone out there is running into similiar issues:
I used JW Player free, which uses the script element in the post body to generate the swf code, bypassing wordpress's mangle tangle.
my sister asked me to do smth for her that let me scratch my head: she wants to make a signature text in a forum and wants to add sound to this signature so when her post is shown the sound will play in background together with her text signature.
I'm not sure this could be done in flash? is there a way to have some jpeg image with sound effect? or should it be a video? maybe forums restrict adding a flash doc as a signature?
any ideas to help make my little sister happy ;)
If you have the flash up and running, and you can't upload this swf to the forum as the signature, the only way to manage this is the forum let's you to use some embed code as the signature. Even then you have to find out where to put the swf content.
On the other hand you have to understand, that if a user would be able to attach any "active content" to his/her signature, the user could easily attach some code too, what could be a problem.
Imagine, you are watching a profile and while listening to the music 1000 popups would show up. So no flishy-flashy, no js and no nothing, that would be a security issue.
You can do this in flash, or you can use html5 audio tags.
But forums usually filter out flash embed tags, and probably would do the same with the audio tag, and if the forum your sister posts on doesn't do it, this would certainly cause them to start. Depending on the forum, she could also end up banned, since embedding sound in a page is usually consider very annoying.
For the happiness of your sister, don't do this.
I want to produce a simple, static HTML file, that has one or more embedded MP3 files in it. The idea is to have a simple mean of listening to specific parts of an mp3 file.
On a single click on a visual element, the sound should start to play; However, not from the beginning of the file, but from a specified starting point in that file (and play to the end of the file). This should work all locally from the client's local filesystem, the HTML file and the MP3 files do not reside on a webserver.
So, how to play the MP3 audio from a specific starting point? The solution I am looking for should be as simple as possible, while working on most browsers, including IE, Firefox and Safari.
Note: I know the <embed> tag as described here, but this seems not to work with my target browsers. Also I have read about jPlayer and other Java-Script-based players, but since I have never coded some JavaScript, I would prefer a HTML-only solution, if possible.
Update: By now this has become a live tool, located at http://quir.li/player.html. I ended up using the excellent mediaplayer.js by John Dyer
I'm sorry but I don't think it is possible to skip to a specific position in a track without any form of client-side scripting. It is possible to just play a track without client-side scripting using a link with its target pointing to an iframe on your page.
Eg.
Play audio
<iframe src="nothingplayingnow.html" name="myplayer"></iframe>
If you'd like to embed the audio file itself into the html document, I think the closest you'd get would be to use the data URI scheme. All the pros and cons are explained nicely in that article.
But all of this is of course possible if you use a bit of client-side scripting. This flash MP3-player lets you skip to certain positions via a javascript interface. The site also has a generator which lets you make your own player interface very easily.
Sorry, but I think you'll have to use at least some javascript to achieve what you're attempting.