Summary and backup of a video playback project at work

Source: Internet
Author: User

1. The webapp mainly contains files in the teaching hall.
FX. aspx is a video, KS. aspx is the test. The data layer of this project uses the LINQ, that is, in the class library, add the -- new item's LINQ to SQL class, then add the table, and configure it. The class library will
Generate an app. config file, similar to Web. config, which is mainly used for database connection. There is a problem here. If the data definition of the table in the database can be null, the lambda expression will be used in the future.
The generated type is null. In this case, if the object class of the model is defined as a normal type, for example, it can be empty as Int ?, If the object is int, Type Mismatch occurs. You only need to modify the object.
When a table changes, you need to add a new version of LINQ to SQL.
2. video players are involved in video playback. The plug-in is ckplayer. How to combine the plug-in with the video in the database is involved. Note that there is also a JS file named main_v _. JS, which contains many things, including
The following code is available. net integration, where, init: function (), equivalent to a variable such as var a: function, and then call a (), or Init (); empty and then carefully study ckplayer, and, later
For player learning, refer to QQ, xinlang, etc. Save the webpage and check the JS Code of the other party.

// News TV list
VaR newstv = function (){
VaR templist = require ('{newtvboxlist'{.html ();
VaR newlist = $ ('ul [node-type = new_video_list] ');
VaR type = $ ("# ih"). ATTR ('name ');
VaR SID = $ ("# ih"). ATTR ('title ');
Return {
Init: function (){
$. Getscript ("/ajax/getvideo. ashx? T = "+ Type +" & SID = "+ Sid );
},
Getdata: function (JSON ){
If (JSON. response. Code = 0 ){
VaR self = this;
VaR Len = JSON. Data. length;
VaR I = 0;
VaR parm = {};
VaR html = [];
VaR Total = JSON. response. Dext;
If (JSON & JSON. Data ){
If (LEN> 0 ){
For (; I <Len; I ++ ){
Parm = {
ID: JSON. Data [I]. ID,
Title: JSON. Data [I]. title,
Time: JSON. Data [I]. Time,
Sname: JSON. Data [I]. sname,
// Column: JSON. Data [I]. Column | '',
IMG: JSON. Data [I]. IMG,
URL: JSON. Data [I]. href,
Vtime: JSON. Data [I]. vtime,
Teacherid: JSON. Data [I]. teacherid,
Serverid: JSON. Data [I]. serverid
};
Html. Push (MU. Render (templist, parm ));
}
Videoscroll. _ txtscroll ();

Newlist.html (html. Join (''));

If (total> 10 ){
// Next page
Page = new pagination ({
Recordcount: total,
// Total number of records
Numericbuttoncount: 5,
// Number of page buttons
Pagesize: 15,
// Number of records per page
Pagecanvas: '# pageit ',
Pageindex: 1
});
Page. addlistener ('pagechanged ', function (){
// Alert ('nth + P. pageindex + 'page ');
Page. Render ();
});
Page. initialize ();
}

}
}

}
}

}
}();
Newstv. INIT ();

 

Summary and backup of a video playback project at work

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.