mediaelementjs PAUSE other players - mp3

I have multiple mediaelement audio mp3 players on my website and even though "pauseOtherPlayers:!0" is present in the mediaelement-and-player.min.js file the other players still don't pause when another begins.
Do I need to add the
pauseOtherPlayers:!0
element to the embedded html code? Or do I need to change it to
pauseOtherPlayers: true
in order for it to work?
Thanks so much for your reply!

Related

How to open different links on different tabs and run javascript code on console

i wish someone could help me! i will try to be precise to explain what i want to reach.
Imagine that regularly i will have some websites where i will need to inject some javascript through console, or make this scrip to run on the website somehow.
So lets say i have 3 links for now: link1.com, link2.com, link3.com
The behavior i want to reach:
Open 1st tab, go to link1.com, run a js script
Open 2nd tab, go to.... (youve got the idea)
it will always run the same script for every page.
And after it runs the last script in the last tab, i want to start everything again, repeat this loop.
And would be great if this code could be nicely readable and functional, for example. Whenever i wanted to add a new link, i would do this so that the code would keep working without needing to change nothing.
Example: we have an array of links ['link1.com', 'link2.com', 'link3.com']. So for a new link, i just needed to push a new link4.com to the array and everything would work fine. It would suit me a lot.
But if theres even a better idea, i would be welcome. I am totally newbie to iMacros, but i have been here to PC for 12h in a row sitting searching, and i am not getting so great results.
So below is what i have reached so far, but nothing working :/
SET !VAR1 EVAL("array[{{!LOOP}} - 1];")
TAB OPEN
TAB T={{!LOOP}} + 1
URL GOTO={{VAR1}}
WAIT SECONDS=3
SET S EVAL("('{{!LOOP}}' == 1) ? 'imacros://run/?m={{next}}.iim' :
'javascript:undefined;';")
SET test EVAL("{{!LOOP}} > 2 ? 'DONE' : '';")
SET stop EVAL("if ('{{test}}') URL GOTO={{S}};")```

Django giving user the ability to manage files/images

I need help understanding hot to go about giving my users the ability to upload and remove files in the same form.
Is there a demo some were i can find?
It seems a pretty redundant task but i cant find a documentation on that.
Not talking about admin.
Thanks.
Not sure what you mean by 'in the same form'. Do you want to upload a new file while marking a already uploaded file as to-be-deleted?
You could put a list of existing files as MultipleChoiceField underneath your FileField and delete whichever the user selected as part of your form processing.
There is also a whole lot of 3rd party packages which might suit your needs:
https://www.djangopackages.com/grids/g/file-managers/
Since I can't comment yet.
You probably want to solve it with ajax requests
[___newfile.txt___] [browse] [add] --POST--> /add
- File 1 [Trash] --GET--> /delete/1
- File 2 [Trash]
- File 3 [Trash]
- File 1 [Trash]
I've created a demo project to show how this works.
You can find it at https://github.com/trostik/djangoimagemanage
Hope it helps some one.
Cheers

Is it necessary to define runtime/"run time" in m3u playlist file or is there a way around it?

E.g. in the m3u file below, the running times are listed as 419, 260 and 255.
#EXTM3U
#EXTINF:419,Alice In Chains - Rotten Apple
Alice In Chains_Jar Of Flies_01_Rotten Apple.mp3
#EXTINF:260,Alice In Chains - Nutshell
Alice In Chains_Jar Of Flies_02_Nutshell.mp3
#EXTINF:255,Alice In Chains - I Stay Away
Is it possible to write an m3u file without these properties?
Or just include some kind of default?
Are there repercussions?
There is no standard for m3u. The time is optional. You can enter just "1" for time if you want. Furthermore, the entire line is optional:
#EXTINF:419,Alice In Chains - Rotten Apple
Alice In Chains_Jar Of Flies_01_Rotten Apple.mp3
Could be replaced with:
Alice In Chains_Jar Of Flies_01_Rotten Apple.mp3
The #EXTINF: tag is for the extended format. As a matter of fact it is not even understood by some players and will cause the entire playlist to appear as empty.
I think this depends a lot on what is going to read the playlist.
The most basic m3u file just contains the list of files (or URLs) without any of the '#' lines. In this format the player will have to read the files if it wants to know their duration. This could be slow especially for URLs.

Not visualizing ASCII STL file correctly

My problem seems similar to Not able to visualize a loaded data , but I have no console errors and I have already added the '-allow-file-access-from-files' flag to my Chrome Browser. Here's my Java coding,
window.onload = function() {
var r = new X.renderer3D();
r.init();
pros = new X.mesh();
pros.file = 'file:///C:/Users/Nathan/Downloads/JB Farmer STL ACII.stl';
pros.caption = 'Prosthetic';
r.add(pros);
r.render();
};
Should I "play around" with with camera position, I know I have to do that in Three.js.
Maybe the model needs normals? I'm not sure if it does or not. I haven't worked with 3D modeling, besides Three.js.
Update: Ummmm, I'm not sure what is going on with this, but I realized that XTK generated 2 canvases . I looked at the first two Lessons and they have one.
^ Now eliminated the extra canvas, must have copied a piece and that was in there.
For the moment, the loader of xtk doesn't seem to be done for local. I mean : it uses an XMLHttpRequest (XHR) to get the file with a GET request. First of all the request must be sent to something that can handle it (a server or localhost emilated by Wamp or equivalent). Then let's imagine if one broswer, no matter what one, allows XHR on a file at client side by his url, and imagine I'm a pirate and you come on my website. I know Windows well, I know in C:/Windows/System32 there always is a file where I can find your personals data. What do I do ? An XHR ! You've been hacked. It's a story but you see the idea.
That's why the only ways allowed by browsers to access local files are HTML5 File API & HTML5 Drag&Drop API (unfortunately...). Actualy a way to go through that limitation is having binary code at the client side (flash, java applet). The client is the only one who can ask to open a file or drop a file, so the browser is sure there won't be any security failure because of him.
So you should test it with something like Wamp and access your file with an url like "http://localhost/.../myfile.stl" or the relative url "/.../myfile.stl", or do the following if you realy want local files.
A few weeks ago I wrote my own parser for a private format for xtk and from local file, it worked well, I just used HTML5 APIs to read the file and get a String or BinaryArray from it and then wrote a parser that transformed it in a X.mesh. So I think the best would be to extend the X.loader for HTML5 file APIs, or like me to manualy load the file.
The following jsFiddle from Haehn helps : here !
What happens if you modify the filename with no space?
JB Farmer_STL_ACII.stl instead of JB Farmer STL ACII.stl

How to Check if a website contains Flash

I've created a web browser using mfc and i'm using IHhmlReader to read the contents of html when the user enters a url in the browser and page is completely loaded.Now i want to check if the webpage has any flash in it.
Any Helps would be highly appreciated.
Thank You.
I think this is a bit difficult to do, just reading from the HTML source, unless you try to instantiate the page and see if it's making a call to the Flash object. I have listed some options you can try, but you'll need to make sure that the code element is not commented out and check include files and iframes to see if Flash is called from there.
* Look for the OBJECT and EMBED tags (see http://kb2.adobe.com/cps/127/tn_12701.html)
* In page's JavaScript, look for SWFObject() call
* Look for the call to .swf file (could even be in an img tag)
Good luck...