Unable to load Cast Sender framework on Chrome Android - video.js

I'm trying to implement chromecast on my nuxt(vuejs) webapp, cast framework loading and working well on chrome desktop. But can't load it on android chrome version.
This code working on desktop and i can cast without problems.
window["__onGCastApiAvailable"] = function(isAvailable) {
if (isAvailable) {
that.initializeCastApi();
};
}
let ccFramework = document.createElement("script");
ccFramework.setAttribute("src","https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");
ccFramework.async = true;
ccFramework.onload = () => {
console.log("loaded");
};
document.getElementById("chromecast").appendChild(ccFramework);
On destop working i can cast on my receiver app.
Videojs player on chrome Desktop
But on android, default browser settings seem to be used instead Chromecast sender framework and provided configuration.. (Chrome V 74.0.3729.136)
Videojs player on chrome Android
Edit : Same problem append in Google Chrome SDK provided demo :
Google Demo Chrome Desktop
Google Demo Chrome Android
Any idea to force framework loading or provide configuration to default chromecast detection ? Or in worst case scenario disable Chromecast in this video on android chrome ?

Related

HTML5 video with RTSP stream source not playing in Chrome on iPhone ios 13.4 but working in Safari

Developing a browser based webrtc streaming system, managed to get it all working properly and allows streaming from all devices. But my problem is on playback: all desktop browsers play it fine, chrome firefox on windows, chrome firefox safari on MacOs, works fine on android devices using chrome or firefox, but on iPhone/iPad iOS 13.4 it will only play in Safari. There are plenty of users using Chrome as their preferred browser on iOS devices, so I'm trying to figure out what can be preventing the videos to play on Chrome( chrome version tested on iphone is Chrome v83.0.4103.88
here is a snippet of the video
<video autoplay muted playsinline loop type ='rtmp/mp4' preload='auto' id="testVideo" style="width:100%;height:100%;" data-setup='{"techOrder": ["html5"], "nativeControlsForTouch": false, "controlBar": { "muteToggle": false, "volumeControl": false, "timeDivider": false, "durationDisplay": false, "progressControl": false } }'></video>
video source is loaded via JS and stream type is RTSP, handled in a Wowza instance media server (V4.7.8), encoding h264 baseline profile/pcma
Can't really find much on stack, most people having similar issues have it with Safari and chrome works fine for them. My problem is Safari works, but only safari on iOS devices.
Any suggestion is much appreciated!
EDIT: streams are published in mp4 format

Appium: How to switch in Mobile App from native App to Mobile Web Browser and run URL on Browser in mobile

I have a native mobile App and automated by using a Appium Driver (AppiumDriver driver) which is working OK and by one Feature of App e.g. unlock Account send an Email to user which need to be confirmed by User.
So I have find out how to get the link in Email and how to get the URL from send Email.(saved in a String var e.g. "href")
So when the automation run I am in Mobile App in window "INFORMATION" which inform user we have send an Email to confirm.
Now my question is
How can I switch from native mobile App (screen INFORMATION)and Put the URL in Browser and after that should open in Browser a Window which ask user enter new password and repeat it and then press OK ?
After that I should again back to the Mobile App.
Do I need another driver like a Web Driver (additional to appium Driver mentioned above) to handle the Actions in Browser after switch?
Thanks for any Support
This my Capability:
public AppiumDriver<MobileElement> driver;
.....
public DesiredCapabilities cap = new DesiredCapabilities();
.....
cap.setCapability("deviceName", helper.getConfiguration(configFileName, "androidDeviceName"));
cap.setCapability("platformName", helper.getConfiguration(configFileName, "androidPlatformName"));
cap.setCapability("PlatformVersion", helper.getConfiguration(configFileName, "androidPlatformVersion"));
cap.setCapability("automationName", "uiautomator2");
cap.setCapability("MobileCapabilityType.FULL_RESET", android_mct_fullReset);
cap.setCapability("MobileCapabilityType.NO_RESET", android_mct_noReset);
cap.setCapability("appium-version", helper.getConfiguration(configFileName, "appiumVersion"));
cap.setCapability("language", helper.deviceLanguage);
cap.setCapability("locale", helper.deviceLocale);
cap.setCapability(AndroidMobileCapabilityType.UNICODE_KEYBOARD, "true");
cap.setCapability("app", app.getAbsolutePath());
....
driver = new AppiumDriver<MobileElement>(new URL("http://localhost:4723/wd/hub"), cap);
I think this will be achieved with :
driver.startActivity(new Activity("com.example", "ActivityName"));
Import by :
import io.appium.java_client.android.Activity;
With this method you can switch application, you must know the APP_PACKAGE and APP_ACTIVITY that you have, try this link or this link to learn this.
This is example the APP_PACKAGE and APP_ACTIVITY google chrome browser from play store :
driver.startActivity(new Activity("com.android.chrome", "com.google.android.apps.chrome.Main"));
You don't need to make a new initialize driver for the browser, just do it.
Your native apps start here
...
Switch to browser
//example chrome
driver.startActivity(new Activity("com.android.chrome", "com.google.android.apps.chrome.Main"));
....
//back to last activity your native app
driver.startActivity(new Activity("yourAPP_PACKAGE", "yourAPP_ACTIVITY"));
You can use Activity class to launch another application using AndroidDriver.startActivity() function like:
Activity activity = new Activity("activity.package", "activity.name");
activity.setStopApp(false);
((AndroidDriver<MobileElement>) driver).startActivity(activity);
An easier way would be just going for Launch command available via SeeTest Appium Extension like:
seetest.launch("activity.name", false, false);

Why video calling not working with webrtc?

I am using the the pubnub example, but when I am calling with laptop chrome browser to iphone safari browser it's not working.
When I try with Iphone safari browser to laptop Chrome browser then it's working fine.
Can anyone suggest me the solution for this issue?

Web RecordRtc video recording does not work in safari and ios, android browser

Is there any solution to run Web Record RTC on safari and ios,androind browser?
I have implemented fully code for video recording in php but it could not work in safari & ios,android browser.
Do Anyone have idea that how to enable usermedia in safari & ios, androind browser.
Safari on the Mac and iOS does not support webRTC. In the browser or webview, webRTC is not supported, which means that getUserMedia is not available, which means that you can't stream video to your web RecordRTC.
If you want to do webRTC, you will have to write native code, or there is a cordova plugin for ios at https://github.com/eface2face/cordova-plugin-iosrtc - this is on the bleeding edge right now, so be ready for some frustration
It is supported on android. The native android browser may or may not work, depending on what your device is. Install chrome and it will work. If you are doing Android webapps, you should use the crosswalk plugin, as it basically provides chrome instead of webview, and then you know that webRTC support is there.

Worklight user-agent

I've been showing a page on the console (Android environment), and testing if this external page (an html page of mine) has been opened using a mobile device or a desktop by checking the user-agent using this piece of code:
navigator.userAgent.match(/Android/i)
If I run this piece of code on the real device it shows it's an Android device, if I launch the Worklight Console it shows it's a desktop device. How can I change the user-agent in order to let Console think it's an Android device? I've installed the Chrome extension but I didn't understand how to use it.
It sounds to me like you want to debug your Android environment (which is meant for mobile devices) while using the Chrome desktop browser?
Try the following and see if this is what you want:
Preview the web resources
If all your web resources are in the common\css or common\js folder, open Worklight Console and click on "preview web resources"
If the web resources are coming from both the common\ and android\ folders, you can use this URL structure: http://replace-with-host-or-ip-address:10080/replace-with-project-name/apps/services/preview/replace-with-app-name/android/1.0,
Open the Chrome DevTools and click on the device icon:
Then, from the UI that will open up you can select from the Devices dropdown to adjust the viewport to that of the chosen Android device.