Research and Practice of CS combined with BS, mobile browser + player Solution

Source: Internet
Author: User

Author: Liu fangqing 2010-05-01

 

I. CS-BS Mode

 

CS is the client-server mode. The client communicates with the server through the custom protocol or http protocol. The advantage of CS mode is that it can flexibly implement various functions and special effects. The disadvantage is that many new functions are available, interface adjustment, logical changes usually need to update the client, it is more troublesome. Like cell phone anti-virus, laidian Tong is the CS mode.

BS is the browser-client mode, such as various mobile websites. The mobile browser is the carrying body of the BS mode on the mobile phone. It implements HTTP protocol related to browser, WML, and HTML parsing rendering. BS mode provides flexible interface adjustment, content update, and logic change. However, many special effects and functions cannot be implemented.

Considering the flexibility and implementation effect, many clients will consider the combination of CS and BS. For example, on mobile QQ and MSN, the im part is the CS mode, and the news is the BS mode.

 

 2. Implementation and integration of Browser/player

 


Considering that the demand is a simple browser, we will not consider the s60 WebKit. The System Browser Interface cbrctlinterface is too simple, and htmlcontrol is the only choice. S60 htmlcontrol is an open-source lightweight browser control. I really admire the work of ytom and other open-source members. htmlcontrol is very powerful, in s60 3rd/5th, in winscw, gcce, and armv5, most WML and HTML pages can be correctly parsed. You can use some examples provided by htmlcontrol.

 

Use WebClient to implement HTTP download and call htmlcontrol to parse and render the downloaded webpage data. It also provides a simple interface jump and the ability to return to the previous page. The image resolution is not added for the moment.

 

Call aevent in the Void cwebclientappui: handlehtmlctleventl (const thtmlctlevent & aevent) function. ielement-> getproperty (khstrhref, href) can get the link address clicked by the user. If it is rtsp: // prefix, the player is triggered to play the video. http: // parse the webpage with the prefix.

 

Iii. application scenarios

 

The original video player is in pure CS mode. users need to enter their own addresses to view the new addresses. It is basically impossible to obtain updates from the server, unless a socket server is written on the server to interact with the client. Now it is convenient to have a browser. You only need to update the webpage content of the server, and the client will be able to update and watch it at will.

 

Browser + player is a common implementation mode for mobile video monitoring and live video-on-demand applications. The following figure shows the effect of web page resolution and video playback on 5530.

 



 



 

 

 

 

 

 

 

 

 

 


 



 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.