Android videoView gives me Alert “Sorry,This video cannot be played”?

后端 未结 4 1117
难免孤独
难免孤独 2020-12-21 16:02
My Code::

public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        VideoView vi         


        
4条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-21 16:46

    i had d same issue and i resolved by adding a delay of 250ms. actually the error occurs when we try to capture and play immediately. At that time, the engine is not yet ready to play (coz it hasnt reached End of streami.e. hasnt read the video completely)

提交回复
热议问题