media

Hide background image using Media Queries

孤街浪徒 提交于 2019-12-24 00:23:41
问题 I'm attempting to remove my background image when people view the site on mobile devices. Here's my code. HTML: <section id="Build"> <div class="img_contain col-xs-8"> <img src="assets/images/RockS_BG.png" "> </div> <div class="column-right col-xs-4 "> <h1>Build</h1> <p> BLA BLA BLA </p> </div> </section> CSS: #build { background-image: url('../images/buildbg.png'); margin: 0 auto; text-align: left; padding-top: 40px; background-color: #D89330; } Is it possible to hide a background image

How to access camera preview frames with MediaCapture class in Unity?

ε祈祈猫儿з 提交于 2019-12-23 22:55:52
问题 I am trying to access camera preview frames of Hololens in a script of a Unity application, but I have some problems. I want to access the camera preview with MediaCapture class. I know that it is posible in a UWP application but I want to do it in Unity. In the UWP application need to create a CaptureElement in the XAML page and after that to set the source of this element, like that: captureElement.source = mediaCapture; mediaCapture.StartPreviewAsync(); But in a Unity application I don't

Get media url in View in Sitecore MVC

五迷三道 提交于 2019-12-23 18:23:22
问题 I have a mp3 file that is stored in the media library. It is referenced in a media field on an item. I can get the URL by doing Sitecore.Resources.Media.MediaManager.GetMediaURL() in webforms or a class. But how can I achieve this in a MVC view? When I dump the field it just renders a html tag. I want to pull out the url only. Also, is there a reference for something like this? Thanks 回答1: You can write an extension method to get the media item URL. Something like this will work (you should

React - refs - audio playback - Unhandled Rejection (NotSupportedError) on iOS

天涯浪子 提交于 2019-12-23 17:56:14
问题 I built a react app that plays/pauses the currently selected audio just fine on desktop web browser: playPreview() { if (!this.state.isPlaying) { this.setState({ isPlaying: true }); this.refs.audioRef.play(); } else { this.setState({ isPlaying: false }); this.refs.audioRef.pause(); } } On iOS mobile browsers (safari and chrome mobile) I get an unhandled rejection (NotSupprted Error): The operation is not supported. I'm aware of the issue that on iOS the audio must play from a user's gesture

Cocoa app respond to keyboard play/pause key without launching iTunes?

戏子无情 提交于 2019-12-23 15:39:14
问题 I read this article and successfully make my app respond to media key: Make my Cocoa app respond to the keyboard play/pause key? However, when I pressed play/pause key, the iTunes started to launch, is there any method to prevent iTunes launching when I press play/pause key in my app? 回答1: Your best bet is to use this SPMediaKeyTap code, it works OK, but it can be flaky since your app's bundle ID isn't included in other's code, and the developer is not responsive to requests for new bundle

MediaElement.js stop all players

笑着哭i 提交于 2019-12-23 12:37:55
问题 I've been playing around with MediaElement.js for a while now and have a new application that uses 20 players on a single page. I'd like to be able to have the songs stop when another one is played - and not to overlap the tracks when they are playing. I can't seem to find an easy way to hack this - perhaps someone knows of a way? Thanks. 回答1: In jQuery, you could do $('video,audio').each(function() { $(this)[0].pause(); }); Let me know if that works. 回答2: A quick and dirty one ;) $(".mejs

Powershell to wake up multiple media drives simultaneously

独自空忆成欢 提交于 2019-12-23 12:36:30
问题 I have a server with lots of media drives ~43TB. An areca 1882ix-16 is set to spin the drives down after 30 minutes of inactivity since most days an individual drive is not even used. This works nicely to prevent unnecessary power and heat. In this case the drives still show up in windows explorer but when you click to access them it takes about 10 seconds for the folder list to show up since it has to wait for the drive to spin up. For administrative work I have a need to spin up all the

Android, media scan doesn't generate thumbnails?

大憨熊 提交于 2019-12-23 05:34:13
问题 I have image files which don't have thumbnails. (imported from my external carmera using NFC) I want to create thumbnails for my image picker view. (has to be fast) At this moment, I'm not even sure "MEDIA SCAN" means "generating thumbnail" or what. I tried to scan file using mMediaScannerConnection.scanFile(mPath, null); onScanCompleted gets called and I try to get thumbnail using the following two version of functions. I get null thumbnailPath for both functions, I don't get why.. private

how to improve my code to make better video quality?

戏子无情 提交于 2019-12-23 05:24:18
问题 I am using the following code to leverage Windows Media Encoder to record screen. I am using Windows Vista, screen resolution 1024 × 768, 32-bit. My issue is, the video could be recorded successfully, but when I playback the recorded video, the quality of video is not very good -- e.g. characters are very obscure. I am wondering what are the parameters I should try to tune to get better quality of recorder video? My code, static WMEncoder encoder = new WMEncoder(); IWMEncSourceGroup SrcGrp;

Authorisation of Website/Media Content in ASP.NET MVC 3

心已入冬 提交于 2019-12-23 04:43:41
问题 I am trying to deny access to a folder or resources when not logged in (prevent leeching). In the folder I have my Web.config: (/Media) <?xml version="1.0"?> <configuration> <system.web> <authorization> <deny users="?"/> <allow users="*" /> </authorization> </system.web> </configuration> The code I am calling: Index: @Video.MediaPlayer( path: "~/Media/Tree Felling2.wmv", width: "600", height: "400", autoStart: false, playCount: 1, uiMode: "full", stretchToFit: true, enableContextMenu: true,