Rendition report is not used when switching resolution on avplayer (safari 16.3) - safari

I'm developing a LL-HLS feature.
When playing the LL-HLS that I developed in Safari, the EXT-X-RENDITION-REPORT tag does not seem to work when the resoution is changed by ABR.
When changing the resolution, the following request is made.
Request without _HLS_msn and _HLS_part query strings when calling chunklist.m3u8 of different resolutions.
Request including _HLS_msn and _HLS_part query strings after requesting chunklist.m3u8 of 1).
In a hls.js, when changing to a different resolution, it was confiremed that _HLS_msn and _HLS_part query strings were included immediately.
OS: macOS (Ventura 13.2.1)
Browser: Safari 16.3
Chunklist.m3u8
EXT-X-SKIP tag is not used
URL: http://10.60.83.51/cvpr0502/onair_llhls_test0001/chunklist_vfrag2500.stream.m3u8
This URL does not play as s sample.
#EXTM3U
#EXT-X-VERSION:7
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-SERVER-CONTROL:CAN-BLOCK-RELOAD=YES,PART-HOLD-BACK=3.000000
#EXT-X-PART-INF:PART-TARGET=1.000000
#EXT-X-TARGETDURATION:3
#EXT-X-MEDIA-SEQUENCE:4
#EXT-X-DISCONTINUITY-SEQUENCE:0
#EXT-X-DATERANGE:ID="nmss-daterange",START-DATE="2023-02-20T08:20:00.474Z"
#EXT-X-MAP:URI="vfrag2500.stream_0_0_0.m4s?type=hls&filetype=.m4s"
#EXT-X-PROGRAM-DATE-TIME:2023-02-20T08:20:13.474Z
#EXT-X-PART:DURATION=1.000000,URI="vfrag2500.stream_1994603194_1676881213474_13_0_4_0.m4v?type=hls&mode=cmaf&filetype=.m4v",INDEPENDENT=YES
#EXT-X-PART:DURATION=1.000000,URI="vfrag2500.stream_1994603194_1676881213474_13_0_4_1.m4v?type=hls&mode=cmaf&filetype=.m4v",INDEPENDENT=YES
#EXT-X-PART:DURATION=1.000000,URI="vfrag2500.stream_1994603194_1676881213474_13_0_4_2.m4v?type=hls&mode=cmaf&filetype=.m4v",INDEPENDENT=YES
#EXTINF:3.000000,
vfrag2500.stream_1994603194_1676881213474_13_0_4.m4v?type=hls&bitrate=287035&filetype=.m4v
#EXT-X-PROGRAM-DATE-TIME:2023-02-20T08:20:16.474Z
#EXT-X-PART:DURATION=1.000000,URI="vfrag2500.stream_3207465476_1676881216474_16_0_5_0.m4v?type=hls&mode=cmaf&filetype=.m4v",INDEPENDENT=YES
#EXT-X-PART:DURATION=1.000000,URI="vfrag2500.stream_3207465476_1676881216474_16_0_5_1.m4v?type=hls&mode=cmaf&filetype=.m4v",INDEPENDENT=YES
#EXT-X-PART:DURATION=1.000000,URI="vfrag2500.stream_3207465476_1676881216474_16_0_5_2.m4v?type=hls&mode=cmaf&filetype=.m4v",INDEPENDENT=YES
#EXTINF:3.000000,
vfrag2500.stream_3207465476_1676881216474_16_0_5.m4v?type=hls&bitrate=345122&filetype=.m4v
#EXT-X-PROGRAM-DATE-TIME:2023-02-20T08:20:19.474Z
#EXT-X-PART:DURATION=1.000000,URI="vfrag2500.stream_3408866808_1676881219474_19_0_6_0.m4v?type=hls&mode=cmaf&filetype=.m4v",INDEPENDENT=YES
#EXT-X-PART:DURATION=1.000000,URI="vfrag2500.stream_3408866808_1676881219474_19_0_6_1.m4v?type=hls&mode=cmaf&filetype=.m4v",INDEPENDENT=YES
#EXT-X-PART:DURATION=1.000000,URI="vfrag2500.stream_3408866808_1676881219474_19_0_6_2.m4v?type=hls&mode=cmaf&filetype=.m4v",INDEPENDENT=YES
#EXTINF:3.000000,
vfrag2500.stream_3408866808_1676881219474_19_0_6.m4v?type=hls&bitrate=277635&filetype=.m4v
#EXT-X-PROGRAM-DATE-TIME:2023-02-20T08:20:22.474Z
#EXT-X-PART:DURATION=1.000000,URI="vfrag2500.stream_562750089_1676881222474_22_0_7_0.m4v?type=hls&mode=cmaf&filetype=.m4v",INDEPENDENT=YES
#EXT-X-PART:DURATION=1.000000,URI="vfrag2500.stream_562750089_1676881222474_22_0_7_1.m4v?type=hls&mode=cmaf&filetype=.m4v",INDEPENDENT=YES
#EXT-X-PRELOAD-HINT:TYPE=PART,URI="vfrag2500.stream_562750089_1676881222474_22_0_7_2.m4v?type=hls&mode=cmaf&filetype=.m4v"
#EXT-X-RENDITION-REPORT:URI="chunklist_vfrag1500.stream.m3u8",LAST-MSN=7,LAST-PART=1
#EXT-X-RENDITION-REPORT:URI="chunklist_vfrag400.stream.m3u8",LAST-MSN=7,LAST-PART=1
#EXT-X-RENDITION-REPORT:URI="chunklist_vfrag100.stream.m3u8",LAST-MSN=7,LAST-PART=1
Network in safari
First chunklist.m3u8 request with different resoltuion
_HLS_msn and _HLS_part query strings not found in URL
enter image description here
Second chunklist.m3u8 request
_HLS_msn=7&_HLS_part=1 query strings included in URL
enter image description here
I tried putting paths in various patterns such as absolute paths and relative paths in the URL property of the EXT-X-RENDITION-REPORT tag, but is didn't work.
Is this the behavior of the EXT-X-RENDITION-REPORT tag? If not, I would be grateful if you could let me know what part needs to be corrected.

Related

PhantomJs rendering

Is there any limit to the number of characters for the file name to get it render from phantomJs?
var page = require('webpage').create();
page.open('http://github.com/', function() {
window.setTimeout(function(){
var filename = encodeURI('The code shown here is also available in various examples included with PhantomJS. You are also recommended to explore the use of PhantomJS for page automation, network monitoring, screen capture, and headless testing The code shown here is also available in various examples included with PhantomJS. You are also recommended to explore the use of PhantomJS for page automation, network monitoring, screen capture, and headless testing');
console.log('filename: ' + filename);
page.render(filename + ".png");
phantom.exit();}, 100);
});
This file is not getting render through phantomJs.
Can someone please help here?
I don't think it has anything to do with PhantomJS, but basically with your OS. There is a size limit for the file path name in every OS.
According to the naming convention in Windos OS -
In the Windows API (with some exceptions discussed in the following
paragraphs), the maximum length for a path is MAX_PATH, which is
defined as 260 characters. A local path is structured in the following
order: drive letter, colon, backslash, name components separated by
backslashes, and a terminating null character. For example, the
maximum path on drive D is "D:\some 256-character path string"
where "" represents the invisible terminating null character for
the current system codepage. (The characters < > are used here for
visual clarity and cannot be part of a valid path string.)

Pass large parameters to browser

I created more than 20 reports using crystal report. Now I am integrating them to my API service. One particular report uses the following parameters:
lngCompanyId=1
szITSfromCompany=Sample
strGroupBy=Region
strGroupBy1=Greater Accra
strQuery1='and #tblRetOutletSumm.iRegionID=4'
strQuery2='and #tblRetOutletSumm.iDistrictID=8'
strQuery3='2016-10-27'
strQuery4='2016-10-27'
strPicHeight=1
strPicWeight=1
Now i have to pass them to my web browser to generate the report. I tried the following URL after running the project:
http://localhost:20010/Home/CreateSummaryReport?lngCompanyId=1&szITSfromPersol=Sample&strGroupBy=Region&strGroupBy1=Greater Accra&strQuery1=and #tblRetOutletSumm.iRegionID=4&strQuery2=and #tblRetOutletSumm.iDistrictID=8&strQuery3=2016-10-27&strQuery4=2016-10-27&strPicHeight=1&strPicWeight=1
It broke the code. It passed up to strGroupBy1 which is Greater Accra but when it came to strQuery1, it only showed me the first word which is and instead of and #tblRetOutletSumm.iRegionID=4 and all the remaining parameters threw null values.
I know the '#' tag causes the problem, so how do I pass the parameter? Or should I change a the database procedure?
Changing the '# tag' by ascii symbol solved the issue.
I changed the '#' tag by '%23' and the issue is solved.
Somad

Google Drive - use WebViewLink vs thumbnailLink

I'm using the Google Drive API where I can gain access to 2 pieces of data that I need to display a jpg file oin my program. WebViewLink is the "large" size image while thumbnailLink is the "thumb" smaller size of the same image.
I'm having an issue with downloading the WebViewLink that I do not have with the thumbnailLink. Part of my code calls either exif_imagetype($filename) or getimagesize($filename) so I can retrieve the type, height & width etc for the $filename. This is successful for the thumbnailView but not the WebViewLink...
code snippet...
$WebViewLink = "https://drive.google.com/a/treering.com/file/d/blablabla";
$type = exif_imagetype($WebViewLink);
--- results in the error
"PHP Warning: exif_imagetype(): stream does not support seeking..."
where as...
$thumbnailLink = "https://lh6.googleusercontent.com/blablabla";
$type = exif_imagetype($thumbnailLink);
--- successful
where $type = 2 // a .jpg file
Not sure what I need to do to gain a usable WebViewLink... maybe use the "export" function to copy to a file on my server that is accessible, then use that exported file for the functions that fail above?
Thanks for any help.
John
I think you are using the wrong property to get the image of the file.
WebViewLink
A link for opening the file in a relevant Google editor or viewer in a browser.
thumbnailLink
A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours.
You can try using the iconLink():
A static, unauthenticated link to the file's icon.
Sample image of thumbnailLink:
Sample image of a iconLink:
It will still show relevant image about the file.
Hope it helps!

Balanced Payments doesn't seem to work with Phonegap

We are not able to call balanced.card.create from a Phonegap application. This is reproduced in a stock Phonegap application here: https://github.com/kevg/phonegap-balanced. Full details are in the README.md on github, but the basic summary is:
For those not familiar with phonegap, the main page that loads is
index.html. This initializes phonegap in index.js. When the device is
ready, we will show a hidden DIV with a button named "Execute
Balanced." When you click this button, app.executeBalanced in index.js
will be called which prompts for the balanced marketplace URI, loads
balanced.js with $.getScript, and then calls balanced.card.create with
a test credit card.
The expected result is that callbackHandler is called or an exception
is caught. Instead, it seems the execution of the Javascript thread
disappears into balanced.card.create, never to return and without any
error.
Alrighty, I found the bug in balanced.js. So, in Phonegap, window.location.href returns something like file:///.../index.html. Balanced.js creates an iframe to something like https://js.balancedpayments.com/proxy#file
var src = proxy + "#" + encodeURIComponent(window.location.href);
https://github.com/balanced/balanced-js/blob/master/src/utils.js#L48
In the script returned in proxy.html (which I can't find on github), it does:
c.parentURL=decodeURIComponent(
window.location.hash.replace(/^#/,"")
).replace(/#.*$/,"")
c.parentDomain=c.parentURL.replace(/([^:]+:\/\/[^\/]+).*/,"$1")
The regex doesn't match because file: has three slashes. Now, at first, I thought I could just convert the regex to:
/([^:]+:\/+[^\/]+).*/
However, then there's another problem, because balanced does a security origin check on the match:
if (d.origin.toLowerCase() !== c.toLowerCase()) return !1;
However, the regex returns file:///firstcomponent, whereas event.origin does not include a host name for the file scheme, so these won't match even with a fixed regex.
I can't change anything in the script returned in the proxy response because if I load that from a domain other than balancedpayments.com, then the AJAX POST fails (return code 0 with a blank body). Therefore, the only thing I can control is the hash passed to the iframe.
However, since this regex is a replace, we can simply pass exactly what we know we need (we don't care that the regex is a no-op).
Therefore, the solution is to change L48 above to:
var src = proxy + "#" + encodeURIComponent("file://");
This works.

Rackspace Cloud Files PHP get_objects at the "Root level"

I have been trying to figure out how to get files that are at the Root level, meaning get all files that don't have a path attached to their file name.
I have a container that looks like this
image.png image/png
ui application/directory
ui/css application/directory
ui/css/test.css text/css
ui/image2.jpg image/jpg
I'm using the call
Container->get_objects(0, null, null, 'ui/');
which returns 2 CF_Objects:
ui/css
ui/image2.jpg
This is the desired output
but if I request the files at the "root level"
Container->get_objects(0, null, null, '/');
returns an empty array.
Container->get_objects(0, null, null, '');
returns all the files in the container.
Ideally It would return two CF_Objects image.png, and ui.
Is there a way to do this?
Thank you!
The Cloud Files Developer guide of Nov 15 2011 page 20 says:
You can also use a delimiter parameter to represent a nested directory
hierarchy without the need for the directory marker objects. You can
use any single character as a delimiter. The listings can return
virtual directories - they are virtual in that they don't actually
represent real objects. like the directory markers, though, they will
have a content-type of application/directory and be in a subdir
section of json and xml results.
If you have the following objects—photos/photo1, photos/photo2,
movieobject, videos/ movieobj4—in a container, your delimiter
parameter query using slash (/) would give you
photos,
movieobject,
videos.
The parameter "delimiter" is not supported by the get_objects in the PHP SDK, and using it seems to be the only way to get the base directory files.
There is currently a merge request in github [this request has since been approved] adding this particular parameter to the get_objects method.
Other users of the Rackspace Cloud Files API PHP SDK have also added support for this parameter.
See if the original php-cloudfiles repo gets updated or just create a fork of the original and add your own code, if you don't feel comfortable adding your own changes, clone a fork that has added the delimiter parameter like
https://github.com/michealmorgan/php-cloudfiles
or
https://github.com/onema/php-cloudfiles
The merge request referenced in the answer was approved on May 09, 2012
An optional parameter for get_objects was added for $delimiter ...
However, there was an error introduced into the code at some other point which falsely reports the Container name is not set if one tries to use any of the optional parameters.
A request has been put in to correct this error.