Surface Holders được tạo ra không đồng bộ, vì vậy bạn phải đợi cho đến khi xử lý surfaceCreated đã bị sa thải trước khi giao trả về đối tượng Chủ Surface với Media Player bằng cách thực hiện các giao diện SurfaceHolder.Callback.
Sau khi tạo và gán Chủ Surface to Media Player của bạn, sử dụng phương pháp setDataSource để chỉ định đường dẫn, URL, hoặc nhà cung cấp nội dung URI của nguồn video để chơi.
Sau khi bạn chọn nguồn phương tiện truyền thông của bạn, gọi chuẩn bị để khởi tạo các media Player để chuẩn bị cho phát lại. Bảng liệt kê 15-4 cho thấy mã bộ xương được sử dụng để khởi tạo một bề mặt Xem trong hoạt động của bạn và gán nó như là một mục tiêu hiển thị cho một Media Player.
đang được dịch, vui lòng đợi..