media

print css: fit in one page

丶灬走出姿态 提交于 2020-06-24 08:38:09
问题 In my page there's only one image. Kind of 1500x3000 px. In the printer, I need that this image's maximum width to be the width of the page, so I did: width 100% in the css, and it works. But the height... the old bullshit of height 100% will never work. Because it always will be 100% of the parent container, then someone must have height defined. Or html or body. So, my question is: make this image fit in one page. Any ideas? 回答1: One way to do it would be to perform some calculations to

print css: fit in one page

你。 提交于 2020-06-24 08:38:04
问题 In my page there's only one image. Kind of 1500x3000 px. In the printer, I need that this image's maximum width to be the width of the page, so I did: width 100% in the css, and it works. But the height... the old bullshit of height 100% will never work. Because it always will be 100% of the parent container, then someone must have height defined. Or html or body. So, my question is: make this image fit in one page. Any ideas? 回答1: One way to do it would be to perform some calculations to

How can I encrypt video file using Dart?

独自空忆成欢 提交于 2020-04-30 06:28:19
问题 I am trying to encrypt a video clip using dart. I have tested this java code https://stackoverflow.com/a/9496626/8511016 and would like to do the same but using dart. 回答1: Here is the solution that I found. Hope it helps. Remember to add the package encryption package to pubspec.yaml import 'dart:convert'; import 'dart:io'; import 'package:encrypt/encrypt.dart'; main() { perfomEncryptionTasks(); } perfomEncryptionTasks() async { await encryptFile(); await decryptFile(); } encryptFile() async

Route audio via speaker when headphone plugged it

我怕爱的太早我们不能终老 提交于 2020-02-21 12:41:06
问题 How we can route audio output via speaker even when the headset is plugged in? My code: if(audioManager.isWiredHeadsetOn()) { audioManager.setWiredHeadsetOn(false); audioManager.setSpeakerphoneOn(true); audioManager.setRouting(AudioManager.MODE_NORMAL, AudioManager.ROUTE_SPEAKER, AudioManager.ROUTE_ALL); audioManager.setMode(AudioManager.MODE_NORMAL); } Am I missing something here? 回答1: Did you try adding <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> to your

Route audio via speaker when headphone plugged it

[亡魂溺海] 提交于 2020-02-21 12:40:10
问题 How we can route audio output via speaker even when the headset is plugged in? My code: if(audioManager.isWiredHeadsetOn()) { audioManager.setWiredHeadsetOn(false); audioManager.setSpeakerphoneOn(true); audioManager.setRouting(AudioManager.MODE_NORMAL, AudioManager.ROUTE_SPEAKER, AudioManager.ROUTE_ALL); audioManager.setMode(AudioManager.MODE_NORMAL); } Am I missing something here? 回答1: Did you try adding <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> to your

Android, how to set meta data to MP4 file?

女生的网名这么多〃 提交于 2020-02-21 11:10:25
问题 I would like to set meta data to MP4 file. I create MP4 file via: new MediaMuxer(mPath, MediaMuxer.OutputFormat.MUXER_OUTPUT_MPEG_4) and file has meta: Title: unknown Artist: unknown Album: unknown Comment: ... similar as: Here I found that for API21+ i could make metadata via: MediaMetadata.Builder but how could i save metadata to created MP4 file? Without extern library please. Thank you. 回答1: To edit/write metadata, Android SDK doesn´t have any method, probably by copyright issues, but you

How to embed streaming rtsp media into an html5 page

℡╲_俬逩灬. 提交于 2020-02-02 06:09:03
问题 I have a security cam that sends via rtsp, which I'm able to capture on vlc player, but I want to embed that into my webpage. I've been searching for hours on how to do this, but have failed to find any recent documentation on how to do this. I am not set on vlc either, so I'm basically trying to go from cam -> rtsp -> player (if required) -> html embed. Any help would be appreciated. And I know this is an open question, but I'm failing to find what I need on the net, so I'm open to any

How to embed streaming rtsp media into an html5 page

人盡茶涼 提交于 2020-02-02 06:05:51
问题 I have a security cam that sends via rtsp, which I'm able to capture on vlc player, but I want to embed that into my webpage. I've been searching for hours on how to do this, but have failed to find any recent documentation on how to do this. I am not set on vlc either, so I'm basically trying to go from cam -> rtsp -> player (if required) -> html embed. Any help would be appreciated. And I know this is an open question, but I'm failing to find what I need on the net, so I'm open to any