Playback rate doesn't change for Chromecast Ultra - casting

I have been working on app, which has possiblity to cast video to chromecast devices. And we have such problem: we need to change playback rate and it works for Chromecast 2.0 (as needed), and doesn't work for Chromecast Ultra (playback rate as default).
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="bohdan_player.js"></script>
</head>
<body>
<audio id="audioPlayer" src="https://www2.iis.fraunhofer.de/AAC/ChID-BLITS-EBU-Narration.mp4" autoplay controls></audio>
<script>
document.getElementById("audioPlayer").playbackRate = 1.5;
</script>
</body>
</html>

Related

Vimeo video unmuted button on desktop

I have trouble when setting embed data for Vimeo on Squarespace.
I have set the iframe code with autoplay = 1 and muted=1 and it works fine on mobile. When I play the video on mobile, it will show the button tap to unmute the video.
However, on the desktop, the video only shows the button to play/pause and has no button to unmute it.
Is there anyone getting into this trouble and do you have any solution for it?
Thanks!
try this might be helpful for you
var iframe = document.querySelector('iframe');
var player = new Vimeo.Player(iframe);
player.on('play', function() {
console.log('video played');
});
<!DOCTYPE html>
<html>
<head>
<title>Iframe video Test</title>
</head>
<body>
<iframe id="vidz" src="https://player.vimeo.com/video/401649410?h=11d74aa27c&portrait=0" width="450" height="253" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen=""></iframe>
<script src="https://player.vimeo.com/api/player.js"></script>
</body>
</html>

Location Based ARJS Example constantly shows alert('Cannot retrieve GPS position. Signal is absent.')

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>GeoAR.js demo</title>
<script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-look-at-component#0.8.0/dist/aframe-look-at-component.min.js"></script>
<script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar-nft.js"></script>
</head>
<body style="margin: 0; overflow: hidden;">
<a-scene vr-mode-ui="enabled: false" embedded arjs="sourceType: webcam; debugUIEnabled: false;">
<a-text value="This content will always face you." look-at="[gps-camera]" scale="120 120 120" gps-entity-place="latitude: 42.123456; longitude: 13.230240;"></a-text>
<a-camera gps-camera rotation-reader> </a-camera>
</a-scene>
</body>
</html>
Checked out the example on both my devices. Everything works fine, except few things. One of them, the most annoying for user, is the alert. It looks like in 1 of 10 or even less ticks(or whatever you call it) the device cannot get my location. Even if it's so, I think it’s ok for an entertainment app.
How to disable the alert?
The simple way i can think of is to completely disable all alert by altering alert functionality when the document is "ready."
<script>
document.addEventListener('DOMContentLoaded', function(){ //equivalent to jQuery $('document').ready(function(){})
/* alert("this will show"); */
alert = function(){};
/* alert("ALL alert after this won't show"); */
}, false);
</script>

Execute Pepper webpage on computer

So I want to use the console of Mozilla in my computer to see what errors have the page that is normally executed by Pepper robot in his tablet, because console.log() is not displayed on Choregraphe log.
I have tried to call the robot qimessaging.js library from computer but it throws an error:
SyntaxError: The URI is malformed. qimessaging.js:12
The html is there:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Video</title>
<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
<script type = "text/javascript" src="http://nao:nao#192.168.1.238/libs/qimessaging/1.0/qimessaging.js"></script>
<script type="text/javascript" src="js/video.js"></script>
</head>
<body>
<canvas width = "320px" height = "240px"></canvas>
<p id="log">log</p>
</body>
</html>
Is there a way to call the qimessaging.js without errors to test the web in my computer?
Instead of console.log() you can use alert().
Also you can connect with your PC browser with this link robot_ip/apps/your_app_name/index.html', but your index.html must be in sub folder named html.
You can also test from your computer if you import the script from the robot directly:
<script src="http://12.34.56.78/libs/qi/2/qi.js"></script>
Then when you open a session, add the robot url as a third argument of the QiSession:
QiSession( onSuccess, onError, "12.34.56.78:80" );
Then your browser will connect to your remote robot.

iMacros ignores some of the clicks

I wrote the following code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<button> Click </button>
</body>
<script>
document.getElementsByTagName('button')[0].addEventListener('click', function() {
alert('OK');
})
</script>
</html>
As you can see, the purpose of this code is launching a dialog box whenever the user clicks the 'button'.
I just started to use iMacros for Chrome, and it seems that iMacros doesn't "catch" this click.
Do you know why and how it can be resolved?

Google Adsense ad not showing up in Jquery Mobile served by django

I'm trying to get a Google AdSense ad to display on my mobile website. I am using Django to serve my web pages and I'm using JQuery Mobile to display and format the content. I've followed these blog instructions on a static html page and the ad shows up fine. When I use the exact same code in my base template, the mobile ad does not show. When I compare the HTML source code they look exactly the same and all the links work exactly the same. Is there something Django injects into the header that would keep the ad from displaying? The HTML source is as follows:
<html>
<head>
<title>Test AdSense</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.css"/>
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.js"></script>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-XXXXXXXXXXXXXXXXXX";
/* LTC MobileHeader */
google_ad_slot = "XXXXXXXXXXXX";
google_ad_width = 320;
google_ad_height = 50;
//-->
</script>
</head>
<body>
<div id="Div1" data-role="page" data-ajax="false">
<header data-role="header" data-position="fixed">
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<h1>Index Page</h1>
</header>
<section data-role="content">
to Page 2
</section>
<footer data-role="footer" data-position="fixed"></footer>
</div>
</body>
</html>
I decided to upload the code to my staging system system which runs on Ubuntu and the ads show up fine. There is something going on with my development environment which runs on windows that is blocking the call to Google.