media

Can I use “OR” in a CSS media query?

做~自己de王妃 提交于 2019-12-02 05:33:25
问题 I'm trying to combine the following three media queries into one: @media only screen and (max-device-width: 480px) { } @media only screen and (-webkit-min-device-pixel-ratio: 2) { } @media only screen and (max-device-width: 1024px) { } I've tried this below, but it doesn't work: @media only screen and (max-device-width: 480px), @media only screen and (-webkit-min-device-pixel-ratio: 2), @media only screen and (max-device-width: 1024px) { } Is there a way to combine these, possibly with an "OR

Automatically play and restart YouTube video via <p:media>

我的梦境 提交于 2019-12-02 05:06:02
How to play a YouTube video automatically without clicking the button using <p:media> ? And how to restart it automatically? <p:media value="#{myviewBean.youtubeURL}" binding="#{myviewBean.youtubeMedia}" width="420" height="320" player="flash"/> 来源: https://stackoverflow.com/questions/31929216/automatically-play-and-restart-youtube-video-via-pmedia

Make CMTime with a very small value

China☆狼群 提交于 2019-12-02 02:08:44
问题 I have a small integer value and I want to convert it into CMTime. The problem is that CMTime(value: _ , timeScale: _) or CMTimeMakeWithSeconds(value: _ , timeScale: _) will always return the floor so that time always equals 0.0 seconds let smallValue = 0.0401588716 let frameTime = CMTime(Int64(smallValue) , timeScale: 1) //frameTime is 0.0 seconds because of Int64 conversion let frameTimeInSeconds = CMTimeMakeWithSeconds(smallValue , timeScale: 1) // frameTimeInSeconds also returns 0.0

Window Media Player issues two requests for the audio on web page

拥有回忆 提交于 2019-12-02 01:31:15
I'm using Windows Media Player in a web page. I have version 11 installed so that is the version I'm testing with right now. The player is embedded on the page with this HTML: <OBJECT id='MS_mediaPlayer' width="400" height="45" classid='CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'> <param name='autoStart' value="false"> <param name='uiMode' value="invisible"> <param name='loop' value="false"> </OBJECT> I

Make CMTime with a very small value

落花浮王杯 提交于 2019-12-02 00:31:59
I have a small integer value and I want to convert it into CMTime. The problem is that CMTime(value: _ , timeScale: _) or CMTimeMakeWithSeconds(value: _ , timeScale: _) will always return the floor so that time always equals 0.0 seconds let smallValue = 0.0401588716 let frameTime = CMTime(Int64(smallValue) , timeScale: 1) //frameTime is 0.0 seconds because of Int64 conversion let frameTimeInSeconds = CMTimeMakeWithSeconds(smallValue , timeScale: 1) // frameTimeInSeconds also returns 0.0 seconds. CMTime represents a time value as a rational number with integer numerator (the value ) and

@Media print css

心已入冬 提交于 2019-12-01 21:55:55
问题 I have my HTML page with this structure: <html> <head></head> <body> <nav> .... navigation menu </nav> <div> <div></div> <div class="to-print"> <h2>My div to display in print mode<h2> <section> <article>....content....</article> </section> </div> <div></div> </div> <div> .... HTML elements </div> </body> </html> If a user tries to print the page, I want only the content of the DIV with class to-print to be printed. How can I achieve that? 回答1: If that is the exact structure of your html then

@Media print css

蹲街弑〆低调 提交于 2019-12-01 21:21:40
I have my HTML page with this structure: <html> <head></head> <body> <nav> .... navigation menu </nav> <div> <div></div> <div class="to-print"> <h2>My div to display in print mode<h2> <section> <article>....content....</article> </section> </div> <div></div> </div> <div> .... HTML elements </div> </body> </html> If a user tries to print the page, I want only the content of the DIV with class to-print to be printed. How can I achieve that? If that is the exact structure of your html then this will work for you. @media print { nav, div > div:not(.to-print), div + div:not(.to-print) { display:

BlackBerry - Play mp4 video from remote server

有些话、适合烂在心里 提交于 2019-12-01 20:36:59
问题 I am using a BrowserSession to play audio and video files. The audio files play without problem, but when I try to play a video file, the browser displays garbage characters. How do I play video files from a remote server, especially .mp4 files? I'm using this code to play the media: BrowserSession browserSession = Browser.getDefaultSession(); //url is the path to the media file from remote server browserSession.displayPage(url); browserSession.showBrowser(); Found the answer: https://github

BlackBerry - Play mp4 video from remote server

为君一笑 提交于 2019-12-01 20:04:23
I am using a BrowserSession to play audio and video files. The audio files play without problem, but when I try to play a video file, the browser displays garbage characters. How do I play video files from a remote server, especially .mp4 files? I'm using this code to play the media: BrowserSession browserSession = Browser.getDefaultSession(); //url is the path to the media file from remote server browserSession.displayPage(url); browserSession.showBrowser(); Found the answer: https://github.com/mjrusso/videostreaming-blackberry 来源: https://stackoverflow.com/questions/4151386/blackberry-play

Avoiding NavigatorUserMediaError “Only secure origins are allowed” on HTTP in Chrome

爱⌒轻易说出口 提交于 2019-12-01 15:42:45
I'm trying to make some audio/video tests with a JavaScript library for SIP phones and since Chrome 47 I can no longer test in local development because of this error: NavigatorUserMediaError {} constraintName: "" message: "Only secure origins are allowed (see:https://goo. gl/Y0ZkNV)." name: "PermissionDeniedError" Is there an option (flag) in Chrome to disable this? Or is there a way to download older versions of Chrome (I couldn't find any)? The unsafely-treat-insecure-origin-as-secure flag works for me as documented here . On OS X this looks like: $ /Applications/Google\ Chrome.app/Contents