I don't know when to order a text message from the City Express. One message is sent every day, and one message is sent every morning and evening. This MMS is on the toilet. It can take some time to get a look at the society and the news at home and abroad. Sometimes a value-added product is not used every day, but when you need it to help you pass the time, you feel a little useful and don't cancel it.
Recently, I also got the MMS service. after entering the company, I felt that the layout of the text was too unfriendly and I always wanted to improve it, so the Baidu SMIL file began. I will not talk about the specifics, but just talk about my improvement path.
Sample SMIL file:
<SMIL>
<Head>
<Layout>
<Root-layout Height = "480px" width = "320px"/>
<Region ID = "image" Top = "0" Left = "0" Height = "40%" width = "100%" Fit = "meet"/>
<Region ID = "text" Top = "40%" Left = "0" Height = "60%" width = "100%" Fit = "meet"/>
</Layout>
</Head>
<Body>
<Par dur = "45 s">
</PAR>
<Par dur = "45 s">
<Text region = "text" src00002.txt "/>
</PAR>
<Par dur = "60 s">
<Text region = "text" src = "column_1.txt"/>
</PAR>
</Body>
</SMIL>
This SMIL file has a single-byte diagram, a single-byte text, and a mix of text and text. You can download and use realpalyer to play the video.
Real results still need to be tested using a mobile phone. The key to realpalyer is:
<Layout>
<Root-layout Height = "480px" width = "320px"/>
<Region ID = "image" Top = "0" Left = "0" Height = "40%" width = "100%" Fit = "meet"/>
<Region ID = "text" Top = "40%" Left = "0" Height = "60%" width = "100%" Fit = "meet"/>
</Layout>
The original size is defined here, and the percentages of the text and graph are displayed on this size.
A problem occurred:
1. Text overlapping scenes (sharp mobile phone)
2. on the graph, the text display is very narrow, and only two rows or so can be displayed. (HTC G7) medium 2
After Continuous testing, I finally found the problem.
3. The first word of <Region ID = "image" ID must be in uppercase, and regimg and image are different. The format of the former is very rigid. No matter whether a single worker only has graphs or texts, it is in absolute positions 3 and 4. The latter is relative position display, that is, if there is no text, the image occupies the whole screen, and if there is no graph, the text is displayed on the top screen in the upper left corner (this is what I want ).
4. <region Height = "40%" is calculated relative to the size defined by <root-layout. In this example, the maximum image size is 480 * 40% = 192px * 320px.
5. For the fit attribute, meet or default is recommended. The meet attribute scales proportionally.
6. In the same region, two images or texts cannot exist at the same time.
Precautions for deselection:
L region only two values can be defined, three cannot be defined at the same time!
L region fit attribute values are generally limited: hidden , meet ;
LIn<Body>Region cannot contain<Seq>Element;
L Region Region, including Left , Top , Width , Height Percentage (relative to the baseboard) Root-Layout ) Identifier;
L the hybrid format must support tape SMIL file and without SMIL file formats.