1

我播放视频的代码如下。在仅 HTC 手机中,我收到错误消息

“网页无法显示

网页 数据:text/html;%20charset=UTF-8;null,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody%20style=%22margin:%200;%20padding:%200%22 %3E%3Ciframe%20type=%22text/html%22%20class=%22youtube-player%22%20width=%22300%22%20height=%22100%%22%20src=%22http

它正在其他设备上运行。

为什么视频链接仅针对此设备不正确,而其他设备却正确解释了它,或者是其他一些问题。请帮忙

String data = "<html>"
                + "<head>"
                + "</head>"
                + "<body style=\"margin: 0; padding: 0\">"
                + "<iframe "
                + "type=\"text/html\" "
                + "class=\"youtube-player\" "
                + "width=\""
                + width
                + "\" "
                + "height=\""
                + height
                + "\" "
                + "src=\"http://www.youtube.com/v/"
                + videoid
                + "?controls=0&showinfo=0&showsearch=0&modestbranding=1&autoplay=1&fs=0\" "
                + "frameborder=\"0\"></iframe>" + "</body>" + "</html>";

webReview.loadData(data,
                        "text/html; charset=UTF-8", null);
4

0 回答 0