How to create MPEG-DASH manifest with multiple fallback URL? - cdn

I have a URL like this http://.../test/index.mpd. What I want is create another dash manifest that will contain multiple fallback URLs pointing the original manifest file.
For example for URL http://example.com/test/index.mpd (original manifest), the new manifest file should contain multiple CDN URLs like:
http://cdn1.com/example/test/index.mpd
http://cdn2.com/example/test/index.mpd
http://cdn3.com/example/test/index.mpd
I found something similar in following URL https://bitmovin.com/docs/player/faqs/how-can-i-utilize-the-cdn-fallback-feature-of-the-player. However, this example adds base URLs to the original manifest file and It does not work for dynamic manifest(live stream). Is there any way to do that. I cannot find good documentation or examples on dash manifest manipulation.

The proper way to do this is via BaseURLs. What do you mean by "It does not work for dynamic manifest"? BaseURLs work independently of the manifest type and definitely do work in dynamic manifests. Perhaps your player is at fault?
Another option is to specify the alternative MPD URLs in <Location> tags which allows you to specify multiple locations at which the MPD is available, but IMO BaseURL is better specified for CDN failover.

Related

"./src/**/*.{html,js}" in tailwindcss's content what does this asterisks mean?

Are this "*" mean anything like "." or ".." when we define path? I am not getting what those means. Why can't I specify the path in the usual way? I wanted to use paths like "../../XYZ" or something like that. But where is this asterisk coming from and what does it mean? Can I define the path in tailwind without using the asterisk?
If anyone can help I would be most glad. I am new to tailwind CSS so a little bit confused. Thank you.
The asteriks are used for dynamic imports for if you want Tailwinds to scan for content in any folder that is under ./src/ (asuming you are using ./src/**/*.{html,js} as content in tailwinds.config.js file. That means if you use ./src/**/*.{html,js}, the first two ** will look for any folder inside ./src, including subfolders.
So, for example, file path in your configuration file will most likely look like:
./src/**/*.{html,js}
./something-else/**/*.{html,js}
And these configured paths will "translate" to something like:
./src/folder1/file.html
./src/folder1/file.js
./src/folder1/subfolder/file.js
./something-else/folder1/file.html
./something-else/folder1/file.js
etc..
Which means if you add a file with the .js or .html extension in the specified folder(s), Tailwinds will automatically include these files in your project.
According to the documentation, you don't want to use really broad path configurations like /**/*.{html,js}' but rather use something like:
./components/**/*.{html,js}
See the Tailwinds content configuration documentation for more examples.
you can use * to match anything except slashes and hidden files,
and use ** to match zero or more directories.
check this site it will help you:
https://tailwindcss.com/docs/content-configuration

openapi documentation how to handle extension in the path

I have URLs like:
/return/{pid}.xml?d1='123'&d2='345'
/return/{pid}.json?d1='123'&d2='345'
the swagger specification calls for:
path:/return/{pid}
....
but how can I map the extension ie
path:/return/{pid}.xml
or
path:/return/{pid}.json
It is a jersey+spring mvc application - so both the URLs are hitting the same controller and only based on the extension the rest framework is going to generate the xml / json output.
I can't ignore the extension from the path ie:
path:/return/{pid}
because the user needs to know that he/she has to provide the file extension as part of the URL. Also I can't use two paths corresponding to xml / json because they are treated the same by the application. In addition it will duplicate things (I am not sure whether there is a fall-through like mechanism just like "case" statements in c++/java "switch" block)
In Swagger specs,You can define the file extensions in the path as below :
/return/{pId}.{fileExtension}
and define the fileExtension in parameters .
also the below is valid (not for your case) :
/return/pid.{fileExtension}

Explanation for url() function Drupal 8

I'm very new to drupal and have to do some real quick small work. While going through the documentation at https://www.drupal.org/docs/8/theming/twig/functions-in-twig-templates, I saw string parameter to url() function.
{{ 'View all content'|t }}
what is the value that url() is taking?
Infact, i'm trying to get relative path. I used
Solutions
But, it didn't work for me because {{directory}} changed each time and led to url append. Is there any best practices? Thank you for suggestions.
When adding a URL into a string, for instance in a text description, core recommends we use the \Drupal\Core\Url class. This has a few handy methods:
Internal URL based on a route - Url::fromRoute(), Example: Url::fromRoute('acquia_connector.settings')
Internal URL based on a path - Url::fromInternalUri(), Example: Url::fromInternalUri('node/add')
External URL - Url::fromUri, Example: Url::fromUri('https://www.acquia.com')
The last two methods are very similar, the main difference is, that fromInternalUri() already assumes an 'internal:' prefix, which tells Drupal to build an internal path. It's worth reading up on what prefixes are supported, for instance the ':entity' prefix can help in building dynamic URIs.
When you need to constrict and display the link as text you can use the toString() method: Url::fromRoute('acquia_connector.settings')->toString().
If you need additional information please ask.

Combine two config files as an a single file

I have a project with 3 subprojects:AdminPages, UserPags ,UIpages,each part has a separate files.for example AdminPages is coded by MVC4, Userpages and Uipages is coded by ASP web form .
So i have 2 config files,my question is can i combine these two files into single file?Or i have to put each project in a special subdomain ?
Thanks.If i can i will add config files to this post.
With a little google, I came to an answer where it was stated that you can use: XmlConfigMerge.
A qoute from the site:
The XmlConfigMerge utility (provided both as a library assembly and as a console application) supports this merging of XML .config files, and also supports setting of specific parameters via XPath filtering and optional Regex pattern matching.
Go there and try their code and documentation. Good luck!

File path as MVC route argument

Part of my application maps resources stored in a number of locations onto web URLs like this:
http://servername/files/path/to/my/resource/
The resources location is modelled after file paths and as a result there can be an unlimited level of nesting. Is it possible to construct an MVC route that matches this so that I get the path in its entirety passed into my controller? Either as a single string or possibly as an params style array of strings.
I guess this requires a match on the files keyword, followed by some sort of wildcard. Though I have no idea if MVC supports this.
A route like
"Files/{*path}"
will get the path as a single string. The * designates it as a wildcard mapping and it will consume the whole URL after "Files/".
For more information on ASP.NET's Routing feature, please see MSDN:
http://msdn.microsoft.com/en-us/library/cc668201.aspx
And for the "catch-all" parameters you want to use, see the section under "Handling a Variable Number of Segments".

Resources