द्वारा एक साधारण वीआर वीडियो प्लेयर कैसे बनाएं, मैं इन क्षेत्रों में एक नया व्यक्ति हूं। मैं अब कार्डबोर्ड के लिए वीडियो चलाने के लिए जिथब में program बदलने की कोशिश कर रहा हूं।Google CardBoard एंड्रॉइड एसडीके और राजवाली
मैं StreamingTexture का उपयोग करके MyRenderer संशोधित।
public class MyRenderer extends RajawaliCardboardRenderer {
public MyRenderer(Context context) {
super(context);
}
private MediaPlayer mMediaPlayer;
private StreamingTexture streamingTexture;
@Override
protected void initScene() {
mMediaPlayer = MediaPlayer.create(this.getContext(), R.raw.test);
streamingTexture = new StreamingTexture("video", mMediaPlayer);
Sphere sphere = createPhotoSphereWithTexture(streamingTexture);
getCurrentScene().addChild(sphere);
getCurrentCamera().setPosition(Vector3.ZERO);
getCurrentCamera().setFieldOfView(75);
}
private static Sphere createPhotoSphereWithTexture(ATexture texture) {
Material material = new Material();
material.setColor(0);
try {
material.addTexture(texture);
} catch (ATexture.TextureException e) {
throw new RuntimeException(e);
}
Sphere sphere = new Sphere(50, 64, 32);
sphere.setScaleX(-1);
sphere.setMaterial(material);
return sphere;
}
}
मैं कच्चे फ़ोल्डर में test.mp4 के रूप में मेरी छोटी वीडियो बचाया, फिर भी, के बाद मैं अपने ऐप दोनों पक्षों ने खाली कर रहे हैं शुरू करते हैं, और वीडियो की ध्वनि वास्तव में खेल रहा है।
मुझे कुछ मदद चाहिए। आपका बहुत बहुत धन्यवाद!
आप मेरा उत्तर http कोशिश कर सकते हैं: // stackoverflow.com/questions/32391282/how-to-use-rajawalivr-or-rajawali-to-play-a-360- वीडियो –