Reputation: 299
In android i have created .mp4 video file and stored it in sdcard. From sdcard i have copied it into computer and try to run it on browser using video tag.
My html code is:-
<!DOCTYPE html>
<html>
<body>
<video width="320" height="240" controls="controls">
<source src="12.mp4" type="video/mp4" />
<source src="12.ogg" type="video/ogg" />
Your browser does not support the video tag.
</video>
</body>
</html>
And my android code is:-
private MediaRecorder prMediaRecorder;
prMediaRecorder.setCamera(prCamera);
prMediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
prMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
prMediaRecorder.setAudioEncoder(AudioEncoder.AMR_NB);
prMediaRecorder.setVideoEncoder(VideoEncoder.H264);
Upvotes: 0
Views: 172
Reputation: 815
<!DOCTYPE html>
<html>
<body>
<video width="320" height="240" controls="controls">
<source src="12.mp4" type="video/mp4" />
<source src="12.ogg" type="video/ogg" />
Your browser does not support the video tag.
</video>
</body>
</html>
Try putting direct path to the video?
private MediaRecorder prMediaRecorder;
prMediaRecorder.setCamera(prCamera);
prMediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
prMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
prMediaRecorder.setAudioEncoder(AudioEncoder.AMR_NB);
prMediaRecorder.setVideoEncoder(VideoEncoder.H264);
Aren't this code for Camera? I am not quite sure regarding this android code but it seems like a android camera code
Upvotes: 1