Super simple flash player for audio? - javascript

I'm looking for a super simple plugin or flash file for audio to fallback from HTML5 <audio> tag with.
I want to be able to connect this to my own element rather than have an existing interface/player. Super leight weight with the only functionality being stop() and play(). Or even easier a play that automatically calls stop first then replays.
Also would be nice to have a dynamic swf for fallback so I don't have to load multiple copies of it on the same page and can just load it once and feed in a file path for it to play.
A jQuery or JS plugin would be great or if anyone has a link to just a swf file that would be awesome and I can just create my own plugin for that.

I've used Flowplayer for quite a while now. Its API allows us to control the player easily through Javascript.
http://flowplayer.org/
If you're looking for something even simpler, take a look at Dewplayer. Never used it, but seems nice and simple enough.
http://www.alsacreations.fr/dewplayer-en.html

I'd recommend SoundJS, which I've helped develop. It allows you to write a single code base that works anywhere, and gracefully uses Web Audio, html audio tags, or flash as appropriate.
Hope that helps.

Related

Copy/paste Lightbox script for third-party sites

I want to give my clients a few bits of copy/paste code so that a Lightbox shows on their site with an iframe showing a URL that I specify. This would be something similar to a support widget that comes up when you click on a button (ZenDesk, UserVoice, etc.).
I've been trying to write this on my own, but after attempting to include jQuery on page load plus the Lightbox CSS file, it's proven to be a little bit of a mess.
Could someone point me in the right direction as to how I can create an optimal bit of JS that can accomplish this? Perhaps a framework already exists so that I don't need to reinvent the wheel?
I found something reliable. Decided to use http://sandbox.scriptiny.com/tinybox2/

How do I build an 'embeddable widget'?

My webapp uses both Rails and JS and I would like users to be able to embed the images they upload to any blog/site.
What do I need to know, from a development point-of-view to allow me to create the functionality that generates an 'embed' link. It can be either a link like YouTube does, or a JS snippet or anything.
Just want to get a high-level overview of what I need to be able to do and how to proceed.
Thanks.
I would try using iframe. I created a widget which used javascript and I put it all into a single html file hosted on my website. Then I gave away an iframe snippet like this for example...
<iframe src="http://mywesbite.com/myWidget.html"></iframe>
The user can simply place the iframe snippet into their website and that's it!
I'm a little bit late to the party here, but I just wanted to add to Jacob's answer.
You can easily allow the user to customize the embedded content (perhaps choose light on dark vs. dark on light text to more closely match the page's environment/design) by using query params within the iframe src:
<iframe src="http://___.com/widget?theme=light&size=large"></iframe>
of course you'd probably want to build a UI to allow the user to make these distinct changes... you can't expect average user's to do that by hand:)
Vimeo's UI for customizing embedded videos is pretty nice if you want a best case scenario.

SWF Video with JS Controls

I'm new to flash and just need to do a simple task but I can't manage to get it to work.
I'm trying to import a video (flv) into a SWF container and need to AS functions which should be exposed to JS (using liveconnect or anything else).
These two function should toggle sound on/off and toggle play/pause. I dont need any user interface or a full featured player, just these two functions.
Does anyone know a straight foward tutorial which covers these issue?
Thanks in advance!
If I am interpreting your question correctly , then I think you want to trigger Actionscript functions using javascript. Well, that this possible. You need to explore the ExternalInterface class. Here are some useful tutorials.

Using Javascript /jquery displaying a single file in a fly out

I am trying to add a player that will play audio on the site. It will play music randomly and display only play/pause? are there any good javascript or jquery plugin/api?
What is the best way to display a single music filefrom a list of files on a flyout on hover? it will have the option to display filename and download option.
Any examples would be much appreciated.
Thanks
I'm not sure of any preexisting libraries that handle this, but it wouldn't be hard to accomplish with HTML5's <audio> tag. You can control it using the play() and pause() methods. Check out HTMLMediaElement on MDC for how to interact with the element.
You could use JQueryUI to create some sort of a dialogue for presentation.

How to convert a PowerPoint slide into HTML?

I am trying to insert PowerPoint slides into HTML preserving links in the PowerPoint slide. I was just wondering if any of you knew a good method to maybe exporting a PowerPoint slide to an HTML and then displaying it in a div on your page, with a link to say do a JavaScript function on that same page.
I've never used it, but PPT2HTML might help. There's also this blog that describes how to save your presentation for the web then modify it.
This isn't exactly what you're after, but there are some html-based presentation tools like S5, DOMSlides you might want to consider as they wouldn't suffer from being translated.
You can use the jQuery plugin called PPTXjs.
This plugin convert pptx to html using javascript only (no server side code needed).
It is based on PPTX2HTML but support a lot more shapes, media (audio, video) and more.
Using:
$("#result").pptxToHtml({
pptxFileUrl: "path/to/slide.pptx"
});
For more details : https://github.com/meshesha/PPTXjs.
1)u can convert it to flash swf
2)convert all slides to an image file and then add 2 buttons(Back,Next) with calling the next and previous images based on an integer variable and this buttons will show u the previous and next slides :)
sorry but u cant embed it without copying all the Powerpoint-exported HTML code in your div tag
Though not quite what you asked, Google Docs or Slideshare both let you embed Powerpoint as flash - perhaps that would be a more elegant way to do this. That is, if embedding is the aim!
I remember there was a function in PowerPoint to export it to an HTML, I would do that and then have it in the page using an <iframe> and then put that inside a <div>

Categories

Resources