Azure media player unable to play DRM content as a MS teams app - iframe

I'm trying to create a small app where I'm going to play a DRM encoded video using azure media player. It is showing error code "(0x10500001)"
[enter image description here][1]
FYI- Player is playing DRM video on all browsers perfectly.
Here is the URL for JSFiddle for AMP DRM Play - https://jsfiddle.net/f0pewmqz/
<!DOCTYPE html>
<html lang="en-US"><head><meta charset="utf-8">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Azure Media Player</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="//amp.azure.net/libs/amp/latest/skins/amp-default/azuremediaplayer.min.css" rel="stylesheet">
<script src="//amp.azure.net/libs/amp/latest/azuremediaplayer.min.js"></script>
</head>
<body>
<h1>Sample: DRM - PlayReady, Widevine, and FairPlay (no token)</h1>
<video id="azuremediaplayer" class="azuremediaplayer amp-default-skin amp-big-play-centered" tabindex="0"> </video>
<script>
var myOptions = {
autoplay: true,
controls: true,
width: "640",
height: "400",
poster: ""
};
var myPlayer = amp("azuremediaplayer", myOptions);
myPlayer.src([{ src: "//ampvideos.streaming.mediaservices.windows.net/9b77ed82-94af-41bc-b08b-537e7a530eb6/sintel_trailer-1080p_fp.ism/manifest", type: "application/vnd.ms-sstr+xml", protectionInfo: [{ type: "PlayReady" }, { type: "Widevine" },{ type: "FairPlay", certificateUrl: "//yourdomain/fairplay.der" }] }, ]);
</script>
</body>
To quickly replicate the issue on MS Teams Desktop app and Browser app:
Copy the URL - https://dhananjaytest.w3spaces.com/saved-from-Tryit-2023-02-14-jhqwb.html
In MS Teams select add Tab option (+).
Select Website option.
Add URL and save.
If you are using Teams on browser you can replicate this by following link and follow the above steps.
https://dhananjaytest.w3spaces.com/saved-from-Tryit-2023-02-14-jhqwb.html

Related

Error:createClient is not defined When using supabase cdn

I'm using Supabase CDN's for a project. When I call the createClient() function this error comes up:
createClient is not defined
I tried it with an older version of the CDN, with another browser and using the old method of SupabaseClient.createClient, but I got:
SupabaseClient is not defined
Is the CDN not working correctly or something else?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>HTML</title>
<!-- Custom Styles -->
<link rel="stylesheet" href="style.css">
</head>
<body>
<p>Nothing to see here...</p>
<!-- Project -->
<script src="https://cdn.jsdelivr.net/npm/#supabase/supabase-js#2"></script>
<script src="main.js"></script>
</body>
</html>
const SupabaseKey = // api here
const SupabaseUrl =// URL here
const options = {
db: {
schema: 'public',
},
auth: {
autoRefreshToken: true,
persistSession: true,
detectSessionInUrl: true
}
}
const supabase = createClient(SupabaseUrl, SupabaseKey, options)
I fixed it by adding an import statement in the JS file like this:
import createClient from 'https://cdn.jsdelivr.net/npm/#supabase/supabase-js/+esm'
The +esm at the end of the URL is from universal module and it now works.

LG WebOS cannot run web app which requires an http server on Simulator

I've got an idea to run Flutter app on WebOS. I've downloaded the latest WebOS sdk and a Simulator (as they already deprecated the Emulator)
I've created a simple Hello World app that simply uses HTML and it ran just fine on the Simulator. Then I decided to add a logic for running Flutter app to it. So now the compiled app structure is like this
The content of the index.html is as follows
<!DOCTYPE html>
<html>
<head>
<base href="/">
<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
<meta name="description" content="A new Flutter project.">
<!-- iOS meta tags & icons -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="flutter_iz_tube_tv">
<link rel="apple-touch-icon" href="icons/Icon-192.png">
<!-- Favicon -->
<link rel="icon" type="image/png" href="favicon.png" />
<title>IZ Tube TV</title>
<link rel="manifest" href="manifest.json">
<script>
// The value below is injected by flutter build, do not touch.
var serviceWorkerVersion = '3924677883';
</script>
<script src="flutter.js" defer></script>
<script src="webOSTVjs-1.2.4/webOSTV.js" charset="utf-8"></script>
<script src="webOSTVjs-1.2.4/webOSTV-dev.js" charset="utf-8"></script>
</head>
<body>
<script>
window.addEventListener('load', function (ev) {
// Download main.dart.js
_flutter.loader.loadEntrypoint({
serviceWorker: {
serviceWorkerVersion: serviceWorkerVersion,
}
}).then(function (engineInitializer) {
return engineInitializer.initializeEngine();
}).then(function (appRunner) {
return appRunner.runApp();
});
});
</script>
</body>
</html>
And here is the content of appinfo.json
{
"id": "com.example",
"version": "0.0.1",
"vendor": "Test TV",
"type": "web",
"main": "index.html",
"title": "tv_app",
"icon": "icon.png",
"largeIcon": "largeIcon.png"
}
This app runs fine in browser if I use a web server.
But the problem starts when I load it on a WebOS Simulator using App button on RCU.
I just cannot run. And the problem is, obviously, because it uses a simple file: protocol instead of running an http server.
I've googled a lot and haven't found a solution to this.
Does anyone know how to run an app like this in simulator?
I've found out it's impossible to do in a Simulator. But there is a workaround. We can add a redirection to the "head" part of index.html file like this (https://webostv.developer.lge.com/develop/app-developer-guide/hosted-web-app/):
<meta http-equiv="refresh" content="0;url=http://0.0.0.0:8080/index.html">
Thus effectively redirecting it to the remote app. And WebOS can display a Flutter app

Error creating a page on the pages app on the magnolia admin central

here is my template definition:
templateScript: /one-pager-module/templates/pages/main.ftl
renderType: freemarker
visible: true
title: One pager template
dialog: one-pager-module:pages/main
areas:
content-sections:
renderType: freemarker
availableComponents:
content-items-list:
id: one-pager-module:components/content-items-list
textImage:
id: one-pager-module:components/textImage
Here is my template script
[#assign title = content.title!"Eric's Classic Cars"]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="keywords" content="${content.keywords!""}"/>
<meta name="description" content="${content.description!""}"/>
<meta name="author" content="">
<title>${title}</title>
[#--bootstrap css--]
<link rel="stylesheet" href="${ctx.contextPath}/.resources/one-pager-module/webresources/bootstrap-3.3.5/bootstrap.min.css ">
<link rel="stylesheet" href="${ctx.contextPath}/.resources/one-pager-module/webresources/bootstrap-3.3.5/bootstrap-theme.min.css ">
[#--Custom CSS--]
<link rel="stylesheet" href="${ctx.contextPath}/.resources/one-pager-module/webresources/css/one-pager.css?z=123">
<link href="http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
[#--HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries--]
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
[#cms.page /]
</head>
<body>
<h1>${title}</h1>
<p>${content.subTitle!"No subtitle defined"}</p>
[#--jquery and bootstrap js--]
<script src="${ctx.contextPath}/.resources/one-pager-module/webresources/bootstrap-3.3.5/jquery.js"></script>
<script src="${ctx.contextPath}/.resources/one-pager-module/webresources/bootstrap-3.3.5/bootstrap.min.js"></script>
<script src="${ctx.contextPath}/.resources/one-pager-module/webresources/bootstrap-3.3.5/jquery.easing.min.js"></script>
[#--custom js--]
<script src="${ctx.contextPath}/.resources/one-pager-module/webresources/js/one-pager.js"></script>
</body>
</html>
Here is my dialog definition
form:
tabs:
- name: tabText
label: Title texts
fields:
- name: title
class: info.magnolia.ui.form.field.definition.TextFieldDefinition
label: Title
- name: subTitle
class: info.magnolia.ui.form.field.definition.TextFieldDefinition
label: Subtitle
- name: copyrightNote
class: info.magnolia.ui.form.field.definition.RichTextFieldDefinition
label: Copyright note
description: Photographers who own the images used on this site
- name: tabBgImage
label: Background
fields:
- name: introBgImage
class: info.magnolia.ui.form.field.definition.LinkFieldDefinition
targetWorkspace: dam
appName: assets
label: Select image
description: Background image of the intro section
identifierToPathConverter:
class: info.magnolia.dam.app.assets.field.translator.AssetCompositeIdKeyTranslator
contentPreviewDefinition:
contentPreviewClass: info.magnolia.dam.app.ui.field.DamFilePreviewComponent
- name: tabMeta
label: SEO
fields:
- name: keywords
class: info.magnolia.ui.form.field.definition.TextFieldDefinition
i18n: true
label: Keywords
description: Keywords and description for search engine optimization
rows: 3
- name: description
class: info.magnolia.ui.form.field.definition.TextFieldDefinition
i18n: true
label: Description
rows: 5
actions: !include /one-pager-module/dialogs/common/default-dialog-actions.yaml
when i create a page on the admin central i get this error.
info.magnolia.ui.api.action.ActionExecutionException: Action execution failed for action: commit
....
Caused by: info.magnolia.config.registry.Registry$InvalidDefinitionException: one-pager-module:pages/main
What i am doing wrong? yet it had worked previously?
I am following the tutorial at: https://documentation.magnolia-cms.com/display/DOCS56/Creating+a+page+template
Yes, it could be, but we'd need more information to know for sure.
In order for your template definition to be valid, everything it "pulls in" must also be valid, including your content-items-list component definition. I have successfully added a page to the demo instance using your definitions above, of course without your content-items-list component, because it's not included here.
It could also be the case that your action includes are incorrect or in the wrong place.
Have you checked the 'Problems' tab in the Definitions app?

nodejs/expressjs update(crUd) operation is not displaying css files

I am making a CRUD app in Nodejs/Expressjs, templating engine is EJS.
The idea for the update is display user_id from a database and when admin clicks on user_id it should redirect to edit_team.ejs page.
It is working fine but when it is redirecting to edit_team.ejs page, the css files are not getting load. I am getting below error
For every other .ejs files, all css files are loaded.
I have included 'public' folder in app.js file.
Code:
Folder Directory:
app.js:
app.use(express.static('app/public'));
view_team.ejs
<a class="button" href='/edit_team/<%= team[i].team_id %>'>
<span class="glyphicon glyphicon-edit" aria-hidden="true"></span>
</a>
edit_team.js:
var express = require('express');
var path = require('path');
const { Client } = require('pg')
const connectionString = 'postgresql://localhost:5432/idid';
//router object
var router = express.Router();
router.get('/edit_team/:id', function(req, res){
res.render('login/edit_team');
});
module.exports = router;
edit_team.ejs (pasting only head section):
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-
awesome.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/style.css">
can someone please help me trying to figure out what is wrong here?
A URL such as /edit_team/23 serves up edit_team.ejs, which contains the relative path css/bootstrap.min.css. This is relative to the /edit_team path, so it'll be edit_team/css/bootstrap.min.css, which probably isn't what you want.
You should be able to confirm this using your browser's dev tools. Look in the Network tab and check the paths for the files that aren't loading.
Try using paths that aren't relative to the current path, such as:
<link href="/css/bootstrap.min.css" rel="stylesheet">
Note the extra /.

Facebook Open Graph Object Action Aggregation with Facebook C# SDK

I've been attempting to implement the new Facebook open graph features with my flash app. My swf is calling the JavaScript function I have on my page (tested with the simple alert()), however I don't see the post going through on my timeline nor am I getting the response alert(). I've also tested my website with the Facebook object debugger and it tells me that the og:url, og:type, and og: title properties are required, but not present(even though they are in my code).
<meta name="fb:app_id" content="<%=appId%>" />
<meta property="og:type" content="MYNAMESPACE:Game Achievement" />
<meta property="og:title" content="GaveAchievementTitleHere" />
<meta property="og:image" content="https://www.example.com/image.jpg" />
<meta property="og:description" content="description" />
<meta property="og:url" content="https://www.example.com/index.aspx"/>
<meta property="game:points" content="42" />
<meta property="game:secret" content="1" />
</head>
<body>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js" type="text/javascript"></script>
<script type="text/javascript">
function postAction(namespace,actionName,objectName,url)
{
//alert("postAction("+namespace+","+actionName+"."+objectName+","+url+")");
FB.api('/me/'+namespace+':'+actionName+
'?'+objectName+'='+url+'&access_token='+<%=Access_Token%>,'post',
function(response)
{
if (!response || response.error)
{
alert('Error occured');
}
else
{
alert('Post was successful! Action ID: ' + response.id);
}
});
};
</script>
Check that you have "App Domain" defined in your Application basic settings, and that your OpenGraph object url is within this domain.
(I had this kind of issue and setting the AppDomain fixed it. By the way, for an achievement Facebook uses "game.achievement" as object type)

Resources