media

Python Django media url not working after setting DEBUG = True

妖精的绣舞 提交于 2019-12-20 05:42:08
问题 As stated in topic, my Django site media url is returning 404 after trying to access it. Everything was working flawless until I wanted to end the development process and set DEBUG = True in settings.py to have the site finished once and for all. When I change DEBUG back to DEBUG = False it works fine once again. I have no idea what's the problem, any suggestions? 回答1: This is by design: https://docs.djangoproject.com/en/1.7/howto/static-files/#serving-static-files-during-development If you

Media object doesn't respond to cookie containing object

我是研究僧i 提交于 2019-12-20 03:57:09
问题 Sorry if the question is very stupid I am trying to show the stream from a person to another user using js I have tried putting it in a cookie but it doesnt work even then.Even when the object in video is the same as the other File 1 var video = document.querySelector("#videoElement"); var x=document.cookie console.log(x) video.srcObject = x; File 2 var video = document.querySelector("#videoElement"); if (navigator.mediaDevices.getUserMedia) { navigator.mediaDevices.getUserMedia({ video: true

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

瘦欲@ 提交于 2019-12-20 02:55: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=

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

邮差的信 提交于 2019-12-19 16:38:11
问题 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)? 回答1: The unsafely-treat-insecure-origin-as-secure

android scanning all .mp3 files in SD Card

左心房为你撑大大i 提交于 2019-12-19 11:42:38
问题 I'm trying to scan all .mp3 files in my SD card and save its name. here is a fragment of code which is responsible for that. 1.What i'm doing wrong? 1. Which is correct path for SD Card /mnt/sdcard or /sdcard ? public class PlayerActivity extends Activity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.player_activity); } public class SongsManager { // SDCard Path //final String MEDIA_PATH = new String(MediaStore.Audio.Media

Run media file in CardView layout

╄→гoц情女王★ 提交于 2019-12-19 11:24:03
问题 Is there a way to have a media file ( audio/video ) running in a cardview layout? I want to have a video preview of the file inside a card layout , when the user clicks on the card the video/audio is taken fullscreen and played, just like Facebook's feed. 回答1: In order to get that kind of functionality you have to solve a few problems: You cannot use VideoView in a list because it is extending SurfaceView , and if playback is on and user starts scrolling, the visual effect will look like

Mediaplayer and delay in playing

人走茶凉 提交于 2019-12-19 10:52:45
问题 I create small application which is media player. I have method where I have a song. I want to delay playing sound after I clicked a button. How I can do this delay. I want to click on the button and after 5 seconds music is playing. I am using: MediaPlayer.create to get song and mediaplayer.start() to start playing, but I don;t know how I can delay start playing my song. 回答1: Use a Handler in your Activity to delay events such as starting the mediaplayer in your case: private RefreshHandler

Controlling volume in C# using WMPLib in Windows

谁都会走 提交于 2019-12-19 10:51:09
问题 The story: I'm writing a music player controlled by voice. Previously the project used winamp for music -- which I'd like to do away with. I'd like to integrate the voice control with music player. The problem is, when changing the volume property of my media player object (mplayer.settings.volume = 5;), it changes the MASTER volume. Meaning any voice feedback will be completely inaudible while music is playing. Not cool when you're driving. If I fire up windows media player, I can change the

Android: playing a song file using default music player

喜欢而已 提交于 2019-12-19 10:46:13
问题 Is there a way to play media with the default media player? I can do this with the following code: Intent intent = new Intent(Intent.ACTION_VIEW); MimeTypeMap mime = MimeTypeMap.getSingleton(); String type = mime.getMimeTypeFromExtension("mp3"); intent.setDataAndType(Uri.fromFile(new File(songPath.toString())), type); startActivity(intent); But this launches a player with less controls and can't be pushed to the background. Can I launch the player with the default media player? 回答1: Try the

MediaPlayer stops playing the sounds - Android

心已入冬 提交于 2019-12-19 09:07:25
问题 Here is a simple piano app and it works but there is a problem. After about 20 clicks (sometimes it is exactly 28 clicks) even I click the buttons it doesn't play any sound. The app doesnt crash or doesn't warn me about anything. It is just nothing . There is no sound. Do you have any idea? package com.example.playaudio; import android.app.Activity; import android.media.AudioManager; import android.media.MediaPlayer; import android.os.Bundle; import android.view.Menu; import android.view.View